From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JNYEc-0007bD-I2 for mharc-grub-devel@gnu.org; Fri, 08 Feb 2008 13:46:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JNYEb-0007Y8-1c for grub-devel@gnu.org; Fri, 08 Feb 2008 13:46:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JNYEX-0007RW-Ue for grub-devel@gnu.org; Fri, 08 Feb 2008 13:46:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JNYEX-0007RO-RL for grub-devel@gnu.org; Fri, 08 Feb 2008 13:45:57 -0500 Received: from mailout11.sul.t-online.de ([194.25.134.85] helo=mailout11.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JNYEX-00025k-HO for grub-devel@gnu.org; Fri, 08 Feb 2008 13:45:57 -0500 Received: from fwd35.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1JNYEW-0007PD-02; Fri, 08 Feb 2008 19:45:56 +0100 Received: from [10.3.2.2] (TEQbf6ZQrh72npT-CAbAcHv+VwYNFusQvfh4CA6PcZHFDhqZ56JkFsQOzePL2H7w1-@[217.235.230.3]) by fwd35.aul.t-online.de with esmtp id 1JNYEJ-1DAfvk0; Fri, 8 Feb 2008 19:45:43 +0100 Message-ID: <47ACA35C.6080803@t-online.de> Date: Fri, 08 Feb 2008 19:45:48 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: multipart/mixed; boundary="------------040009070508080406050204" X-ID: TEQbf6ZQrh72npT-CAbAcHv+VwYNFusQvfh4CA6PcZHFDhqZ56JkFsQOzePL2H7w1- X-TOI-MSGID: 9dbc3bce-b02a-415d-a4d9-c0154d8373b1 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Create floppy emulation boot CD with grub-mkimage X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2008 18:46:01 -0000 This is a multi-part message in MIME format. --------------040009070508080406050204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 * util/i386/pc/grub-mkrescue.in: Add --image-type=floppycd to create a floppy emulation boot CD when non emulation mode does not work. --------------040009070508080406050204 Content-Type: text/x-patch; name="grub2-mkrescue-floppycd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub2-mkrescue-floppycd.patch" --- 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` --------------040009070508080406050204--