A CD created by "grub-mkrescue --image-type=cdrom" does not work for me
for some reason. Is it probably necessary to supply -boot-load-seg to
genisoimage?
But booting a grub2 rescue floppy image in El Torito emulation mode
works. This patch adds the image type "floppycd" to create such a CD.
Christian
2008-02-08 Christian Franke <[EMAIL PROTECTED]>
* util/i386/pc/grub-mkrescue.in: Add --image-type=floppycd
to create a floppy emulation boot CD when non emulation mode
does not work.
--- grub2.orig/util/i386/pc/grub-mkrescue.in 2008-02-03 20:29:54.562500000 +0100
+++ grub2/util/i386/pc/grub-mkrescue.in 2008-02-08 18:21:27.734375000 +0100
@@ -45,7 +45,7 @@ Make GRUB rescue image.
--overlay=DIR overlay directory DIR in the memdisk image
--pkglibdir=DIR use images from directory DIR instead of ${pkglibdir}
--grub-mkimage=FILE use FILE as grub-mkimage
- --image-type=TYPE select floppy or cdrom (default)
+ --image-type=TYPE select floppy, floppycd, or cdrom (default)
grub-mkimage generates a bootable rescue image of the specified type.
@@ -77,7 +77,7 @@ for option in "$@"; do
--image-type=*)
image_type=`echo "$option" | sed 's/--image-type=//'`
case "$image_type" in
- floppy|cdrom) ;;
+ floppy|floppycd|cdrom) ;;
*)
echo "Unknown image type \`$image_type'" 1>&2
exit 1 ;;
@@ -113,7 +113,7 @@ if test "x$overlay" = x ; then : ; else
cp -dpR ${overlay}/* ${aux_dir}/
fi
-if [ "x${image_type}" = "xfloppy" ] ; then
+if [ "x${image_type}" = "xfloppy" -o "x${image_type}" = "xfloppycd" ] ; then
# build memdisk
memdisk_img=`mktemp`
tar -C ${aux_dir} -cf ${memdisk_img} boot
@@ -125,8 +125,20 @@ if [ "x${image_type}" = "xfloppy" ] ; th
rm -f ${memdisk_img}
# build floppy image
- cat ${input_dir}/boot.img ${core_img} /dev/zero | dd bs=1024 count=1440 > $output_image
+ if [ "x${image_type}" = "xfloppycd" ] ; then
+ floppy_dir=`mktemp -d`
+ floppy_img=${floppy_dir}/grub_floppy
+ else
+ floppy_img=${output_image}
+ fi
+ cat ${input_dir}/boot.img ${core_img} /dev/zero | dd bs=1024 count=1440 > ${floppy_img}
rm -f ${core_img}
+
+ if [ "x${image_type}" = "xfloppycd" ] ; then
+ # build iso image
+ genisoimage -b grub_floppy -o ${output_image} -r ${floppy_dir}
+ rm -rf ${floppy_dir}
+ fi
else
# build core.img
core_img=`mktemp`
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel