summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 22:58:07 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 22:58:07 +0000
commite536bc7c874452cef9c8c9f24d93a7972b756e8c (patch)
tree57ae7deac88062ed44f5f481b09b278faf762ab6 /gnu
parent0f2f5aca8d409ac3c46c9d1f5efa1ef0a9f693f4 (diff)
Teach mkhybrid how to create an El Torito non-emulation boot CD, with
a 2,048-byte boot sector. ok weingart@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.sbin/mkhybrid/src/eltorito.c17
-rw-r--r--gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl18
-rw-r--r--gnu/usr.sbin/mkhybrid/src/mkhybrid_man.html19
3 files changed, 36 insertions, 18 deletions
diff --git a/gnu/usr.sbin/mkhybrid/src/eltorito.c b/gnu/usr.sbin/mkhybrid/src/eltorito.c
index 15bcc559907..de1beb7c26b 100644
--- a/gnu/usr.sbin/mkhybrid/src/eltorito.c
+++ b/gnu/usr.sbin/mkhybrid/src/eltorito.c
@@ -21,7 +21,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-static char rcsid[] ="$Id: eltorito.c,v 1.1 2000/10/10 20:40:14 beck Exp $";
+static char rcsid[] ="$Id: eltorito.c,v 1.2 2004/06/22 22:58:06 tom Exp $";
#include <stdio.h>
#include <sys/types.h>
@@ -252,6 +252,15 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
#endif /* APPLE_HYB */
fprintf(stderr,"Emulating a 1.2 meg floppy\n");
}
+ else if (nsectors == 4 )
+ {
+ default_desc.boot_media[0] = EL_TORITO_MEDIA_NOEMUL;
+#ifdef APPLE_HYB
+ /* NON-HFS change */
+ if (verbose > 0 )
+#endif /* APPLE_HYB */
+ fprintf(stderr,"No-emulation CD boot sector\n");
+ }
else
{
fprintf(stderr,"\nError - boot image is not the an allowable size.\n");
@@ -260,9 +269,11 @@ void FDECL1(get_torito_desc, struct eltorito_boot_descriptor *, boot_desc)
/*
- * FOR NOW LOAD 1 SECTOR, JUST LIKE FLOPPY BOOT!!!
+ * FOR NOW LOAD 1 SECTOR, JUST LIKE FLOPPY BOOT, unless it's no-emulation
+ * boot.
*/
- nsectors = 1;
+ if (default_desc.boot_media[0] != EL_TORITO_MEDIA_NOEMUL)
+ nsectors = 1;
set_721(default_desc.nsect, (unsigned int) nsectors );
#ifdef DEBUG_TORITO
fprintf(stderr,"Extent of boot images is %d\n",get_733(de->isorec.extent));
diff --git a/gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl b/gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl
index b32c1b51708..1895c56f0b0 100644
--- a/gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl
+++ b/gnu/usr.sbin/mkhybrid/src/mkhybrid.8tbl
@@ -2,7 +2,7 @@
.\" To print, first run through tbl
.\" -*- nroff -*-
.\"
-.\" $Id: mkhybrid.8tbl,v 1.1 2001/10/04 17:36:19 wilfried Exp $
+.\" $Id: mkhybrid.8tbl,v 1.2 2004/06/22 22:58:06 tom Exp $
.\"
.TH MKHYBRID 8 "7 April 1999" "Version 1.12b5.1"
.SH NAME
@@ -413,13 +413,17 @@ an "El Torito" bootable CD. The pathname must be relative to the source
path specified to
.B mkhybrid.
This option is required to make a bootable CD.
-The boot image must be exactly the size of either a 1.2, 1.44, or a 2.88
-meg floppy, and
+The boot image must be exactly the size of one of a 1.2, 1.44, or
+2.88 MB floppy, or of a 2 KB CD sector,
+and
.B mkhybrid
-will use this size when creating the output iso9660
-filesystem. It is assumed that the first 512 byte sector should be read
-from the boot image (it is essentially emulating a normal floppy drive).
-This will work, for example, if the boot image is a LILO based boot floppy.
+will use this size when creating the output iso9660 filesystem.
+If the boot file is 2 KB long, a no-emulation boot CD will be created,
+and the whole 2 KB will be read on boot.
+If the boot file is a floppy image,
+then only the first 512-byte sector will be read from the boot image
+(it is emulating a normal floppy drive).
+This will work, for example, if the boot image is a LILO-based boot floppy.
.TP
.BI \-C " last_sess_start,next_sess_start
This option is needed when
diff --git a/gnu/usr.sbin/mkhybrid/src/mkhybrid_man.html b/gnu/usr.sbin/mkhybrid/src/mkhybrid_man.html
index 18ae3f1b49c..2f4be64d128 100644
--- a/gnu/usr.sbin/mkhybrid/src/mkhybrid_man.html
+++ b/gnu/usr.sbin/mkhybrid/src/mkhybrid_man.html
@@ -191,15 +191,18 @@
Specifies the path and filename of the boot image
to be used when making an "El Torito" bootable CD.
The pathname must be relative to the source path
- specified to <STRONG>mkhybrid.</STRONG> This option is required to
+ specified to <STRONG>mkhybrid</STRONG>. This option is required to
make a bootable CD. The boot image must be exactly
- the size of either a 1.2, 1.44, or a 2.88 meg
- floppy, and <STRONG>mkhybrid</STRONG> will use this size when creat-
- ing the output iso9660 filesystem. It is assumed
- that the first 512 byte sector should be read from
- the boot image (it is essentially emulating a nor-
- mal floppy drive). This will work, for example, if
- the boot image is a LILO based boot floppy.
+ the size of one of a 1.2, 1.44, or 2.88 MB floppy,
+ or of a 2 KB CD sector, and <STRONG>mkhybrid</STRONG> will use this
+ size when creating the output iso9660 filesystem.
+ If the boot file is 2 KB long, a no-emulation boot
+ CD will be created, and the whole 2 KB will be read
+ on boot. If the boot file is a floppy image, then
+ only the first 512-byte sector will be read from
+ the boot image (it is emulating a normal floppy
+ drive). This will work, for example, if the boot
+ image is a LILO-based boot floppy.
<STRONG>-C</STRONG> <EM>last</EM><STRONG>_</STRONG><EM>sess</EM><STRONG>_</STRONG><EM>start,next</EM><STRONG>_</STRONG><EM>sess</EM><STRONG>_</STRONG><EM>start</EM>
This option is needed when <STRONG>mkisofs</STRONG> is used to cre-