aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-21 15:36:50 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-21 15:36:50 -0700
commite462c28ffaca0132c1761736bc93cb06a41dc7a6 (patch)
tree24edb9f85175bdd6cc30bf270f3e59571bca71ae /utils
parentd4d9f190900d31b5e9428401a0175012957d7cb7 (diff)
downloadsyslinux.git-e462c28ffaca0132c1761736bc93cb06a41dc7a6.tar.gz
syslinux.git-e462c28ffaca0132c1761736bc93cb06a41dc7a6.tar.xz
syslinux.git-e462c28ffaca0132c1761736bc93cb06a41dc7a6.zip
isohybrid: support booting from partition; fix CBIOS booting
Fix CBIOS in isohybrid mode. Also allow an isohybrid image to be booted from a partition. Unfortunately this breaks compatibility between differing versions of isohybrid and isolinux.bin. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile3
-rw-r--r--utils/isohybrid.in13
2 files changed, 11 insertions, 5 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 7670bef6..9df9595a 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -23,7 +23,8 @@ LDFLAGS = -O2 -s
TARGETS = mkdiskimage isohybrid gethostip
ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass syslinux2ansi
-ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin
+ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin \
+ ../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin
all: $(TARGETS)
diff --git a/utils/isohybrid.in b/utils/isohybrid.in
index 2bbaada4..b3a502bc 100644
--- a/utils/isohybrid.in
+++ b/utils/isohybrid.in
@@ -43,6 +43,7 @@ use Fcntl;
'type' => [0, 255],
'id' => [0, 0xffffffff],
'hd0' => [0, 2],
+ 'partok' => [0, 1],
);
# Boolean options just set other options
@@ -50,6 +51,8 @@ use Fcntl;
'nohd0' => ['hd0', 0],
'forcehd0' => ['hd0', 1],
'ctrlhd0' => ['hd0', 2],
+ 'nopartok' => ['partok', 0],
+ 'partok' => ['partok', 1],
);
sub usage() {
@@ -63,6 +66,7 @@ sub usage() {
" -id Specify MBR ID (default random)\n",
" -forcehd0 Always assume we are loaded as disk ID 0\n",
" -ctrlhd0 Assume disk ID 0 if the Ctrl key is pressed\n",
+ " -partok Allow booting from within a partition\n";
exit 1;
}
@@ -161,9 +165,10 @@ if ($de_boot != 0x88 || $de_media != 0 ||
# Now $de_lba should contain the CD sector number for isolinux.bin
seek(FILE, $de_lba*2048+0x40, SEEK_SET) or die "$0: $file: $!\n";
read(FILE, $ibsig, 4);
-if ($ibsig ne "\xfb\xc0\x78\x70") {
- die "$0: $file: bootloader is missing isolinux.bin hybrid signature\n".
- "Note: isolinux-debug.bin does not support hybrid booting\n";
+if ($ibsig ne "\xf7\xe3\xef\x0d") {
+ die "$0: $file: bootloader is missing current (3.81+) isolinux.bin\n".
+ " hybrid signature; Note that isolinux-debug.bin does not\n".
+ " support hybrid booting.\n";
}
# Get the total size of the image
@@ -202,7 +207,7 @@ if (defined($opt{'id'})) {
# Print the MBR and partition table
seek(FILE, 0, SEEK_SET) or die "$0: $file: $!\n";
-for ($i = 0; $i <= $opt{'hd0'}; $i++) {
+for ($i = 0; $i <= $opt{'hd0'}+3*$opt{'partok'}; $i++) {
$mbr = get_hex_data();
}
if ( length($mbr) > 432 ) {