From 07eb1663bd31bcaf7a194db9bfb6bfe14b47eaa0 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 25 May 2009 19:13:04 -0700 Subject: [PATCH] altmbr: cap at 439 bytes so the partition select byte follows Cap altmbr at 439 bytes, so that the partition select byte is not part of the file. This means that: a) updating the altmbr doesn't clobber the configuration; b) it is easier to simply concatenate the select byte to the file. This also matches gptmbr behavior. Signed-off-by: H. Peter Anvin --- NEWS | 2 ++ mbr/checksize.pl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b032a41..bfc65e3 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ Changes in 3.81: * Menu system: don't set the autocr flag on the serial console. * altmbr: fix handling of logical partitions. + * altmbr: cap at 439 bytes so the partition select byte isn't + part of the file. Changes in 3.80: * New shuffler mechanism and API. diff --git a/mbr/checksize.pl b/mbr/checksize.pl index 7d61bdf..c1984db 100755 --- a/mbr/checksize.pl +++ b/mbr/checksize.pl @@ -30,7 +30,7 @@ if (!defined($maxsize)) { } elsif ($file =~ /^isohdp[fp]x[^0-9a-z]/) { $maxsize = $padsize = 432; } elsif ($file =~ /^altmbr[^0-9a-z]/) { - $maxsize = 439; $padsize = 440; + $maxsize = $padsize = 439; } else { die "$0: no default size for filename: $file\n"; } -- 2.7.4