diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-05 15:21:40 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-05 15:21:40 -0700 |
commit | c4410d5977e8cb2cfe468faeed6e60e72b58ccac (patch) | |
tree | 1b4ea06b5f13550fbbb2e1cf699cc456c90f593a | |
parent | 669c4e56aa4e672cd651b316075440a9f639be7e (diff) | |
download | syslinux-3.72-pre3.tar.gz |
isohybrid: fix partition table generation, documentsyslinux-3.72-pre3
Fix the generation of the partition table in isohybrid; also document
the operation of the partition table.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | doc/isolinux.txt | 5 | ||||
-rw-r--r-- | utils/isohybrid.in | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/doc/isolinux.txt b/doc/isolinux.txt index dd8bca5a..eca2a974 100644 --- a/doc/isolinux.txt +++ b/doc/isolinux.txt @@ -96,6 +96,11 @@ This image can then be copied using any raw disk writing tool (on Unix systems, typically "dd" or "cat") to a USB disk, or written to a CD-ROM using standard CD burning tools. +The ISO 9660 filesystem is encapsulated in a partition (which starts +at offset zero, which may confuse some systems.) This makes it +possible for the operating system, once booted, to use the remainder +of the device for persistent storage by creating a second partition. + ++++ BOOTING DOS (OR OTHER SIMILAR OPERATING SYSTEMS) ++++ diff --git a/utils/isohybrid.in b/utils/isohybrid.in index a0487ca0..5e3f785a 100644 --- a/utils/isohybrid.in +++ b/utils/isohybrid.in @@ -124,7 +124,7 @@ $mbr .= pack("V", $id); # Offset 440: MBR ID $mbr .= "\0\0"; # Offset 446: actual partition table # Print partition table -$psize = $c*$h*$s-$s; +$psize = $c*$h*$s; $bhead = 0; $bsect = 1; $bcyl = 0; @@ -132,18 +132,12 @@ $ehead = $h-1; $esect = $s + ((($cc-1) & 0x300) >> 2); $ecyl = ($cc-1) & 0xff; $fstype = 0x83; # Linux (any better ideas?) -$pentry = 1; -if ( $c > 1024 ) { - $fstype = 0x0e; -} elsif ( $psize > 65536 ) { - $fstype = 0x06; -} else { - $fstype = 0x04; -} +$pentry = 1; # First partition slot + for ( $i = 1 ; $i <= 4 ; $i++ ) { if ( $i == $pentry ) { $mbr .= pack("CCCCCCCCVV", 0x80, $bhead, $bsect, $bcyl, $fstype, - $ehead, $esect, $ecyl, $s, $psize); + $ehead, $esect, $ecyl, 0, $psize); } else { $mbr .= "\0" x 16; } |