]> git.proxmox.com Git - grub2.git/commitdiff
2008-04-13 Christian Franke <franke@computer.org>
authorrobertmh <robertmh@localhost>
Sun, 13 Apr 2008 15:13:49 +0000 (15:13 +0000)
committerrobertmh <robertmh@localhost>
Sun, 13 Apr 2008 15:13:49 +0000 (15:13 +0000)
        * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
        to create a floppy emulation boot CD when non emulation mode
        does not work.
        Enable Joliet CD filesystem extension.

ChangeLog
util/i386/pc/grub-mkrescue.in

index 71400698d553af7de58f4219c7f4444f4731c81e..8ab8ba7679ee18e4c4851e37758ef1ea416d95e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-13  Christian Franke  <franke@computer.org>
+
+       * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
+       to create a floppy emulation boot CD when non emulation mode
+       does not work.
+       Enable Joliet CD filesystem extension.
+
 2008-04-13  Robert Millan  <rmh@aybabtu.com>
 
        * kern/misc.c (grub_strncat): Fix off-by-one error.
index 53bf8f652dc145d0592aff1c0401b299303221ee..668f270f425f966368f01c4ffb8d5d41fb854f08 100644 (file)
@@ -46,6 +46,8 @@ Make GRUB rescue 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)
+  --emulation=TYPE        select El Torito boot emulation type floppy
+                          or none (default) (cdrom only)
 
 grub-mkimage generates a bootable rescue image of the specified type.
 
@@ -56,6 +58,7 @@ EOF
 image_type=cdrom
 input_dir=${pkglibdir}
 grub_mkimage=grub-mkimage
+emulation=none
 
 # Check the arguments.
 for option in "$@"; do
@@ -82,6 +85,14 @@ for option in "$@"; do
             echo "Unknown image type \`$image_type'" 1>&2
             exit 1 ;;
         esac ;;
+    --emulation=*)
+       emulation=`echo "$option" | sed 's/--emulation=//'`
+        case "$emulation" in
+          floppy|none) ;;
+          *)
+            echo "Unknown emulation type \`$emulation'" 1>&2
+            exit 1 ;;
+        esac ;;
     -*)
        echo "Unrecognized option \`$option'" 1>&2
        usage
@@ -118,7 +129,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${emulation}" = xfloppy ] ; then
   # build memdisk
   memdisk_img=`mktemp`
   tar -C ${aux_dir} -cf ${memdisk_img} boot
@@ -130,8 +141,21 @@ if [ "x${image_type}" = "xfloppy" ] ; then
   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}" = xcdrom ] ; then
+    floppy_dir=`mktemp -d`
+    floppy_img=${floppy_dir}/grub_floppy.img
+  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}" = xcdrom ] ; then
+    # build iso image
+    genisoimage -b grub_floppy.img \
+      -o ${output_image} -r -J ${floppy_dir}
+    rm -rf ${floppy_dir}
+  fi
 else
   # build core.img
   core_img=`mktemp`
@@ -144,7 +168,7 @@ else
   # build iso image
   genisoimage -b boot/grub/grub_eltorito \
     -no-emul-boot -boot-load-size 4 -boot-info-table \
-    -o ${output_image} -r ${aux_dir}
+    -o ${output_image} -r -J ${aux_dir}
   rm -rf ${aux_dir}
 fi