diff options
-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; } |