All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Create floppy emulation boot CD with grub-mkimage
@ 2008-02-08 18:45 Christian Franke
  2008-02-08 19:17 ` Robert Millan
  2008-02-08 23:14 ` Robert Millan
  0 siblings, 2 replies; 34+ messages in thread
From: Christian Franke @ 2008-02-08 18:45 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

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  <franke@computer.org>

	* util/i386/pc/grub-mkrescue.in: Add --image-type=floppycd
	to create a floppy emulation boot CD when non emulation mode
	does not work.



[-- Attachment #2: grub2-mkrescue-floppycd.patch --]
[-- Type: text/x-patch, Size: 1933 bytes --]

--- 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`

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [PATCH] Create floppy emulation boot CD with grub-mkimage
@ 2008-03-04  2:11 Kalamatee
  2008-03-04  2:12 ` Kalamatee
  0 siblings, 1 reply; 34+ messages in thread
From: Kalamatee @ 2008-03-04  2:11 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

>>* *>* OK, e.g.*
>>* *
>>* . --emulation=TYPE        select El Torito boot emulation type floppy*
>>* .                         or none (default) (cdrom only)*
>>* *
>>* *
>>* Or with the help syntax used by the grub binaries:*
>>* *
>>* . --emulation=(floppy|none) select El Torito boot emulation type (cdrom
*
>>* only)*
>>* .                           [default=none]*

>I don't mind either way.  Anyone else does?

Doesnt "El Torito" mean using no emulation?

if so id word it differently since it is confusing otherwise...

*--emulation=(floppy|eltorito)   if '--image-type=cdrom', this specifies the
method used to boot **[default=eltorito]*

[-- Attachment #2: Type: text/html, Size: 1242 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [PATCH] Create floppy emulation boot CD  with grub-mkimage
@ 2008-03-04  9:22 Christian Franke
  0 siblings, 0 replies; 34+ messages in thread
From: Christian Franke @ 2008-03-04  9:22 UTC (permalink / raw)
  To: grub-devel

Kalamatee wrote:
> 
> Doesnt "El Torito" mean using no emulation?   
> 

--emulation=(floppy|none)  selects "El Torito" emulation mode (2|0)

"El Torito" Standard 1.0 (1995) specifies 5 emulation modes:

0  No Emulation
1  1.2MB Floppy
2  1.44MB Floppy
3  2.88MB Floppy
4  Hard Disk (drive 0x80)

See:
http://www.phoenix.com/NR/rdonlyres/98D3219C-9CC9-4DF5-B496-A286D893E36A/0/specscdrom.pdf

Christian






^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2008-04-13 15:14 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 18:45 [PATCH] Create floppy emulation boot CD with grub-mkimage Christian Franke
2008-02-08 19:17 ` Robert Millan
2008-02-08 22:03   ` Christian Franke
2008-02-08 22:45     ` Robert Millan
2008-02-08 23:07       ` Pavel Roskin
2008-02-08 23:10         ` Robert Millan
2008-02-08 23:17       ` Christian Franke
2008-02-08 23:35         ` Robert Millan
2008-02-09 11:56       ` Bean
2008-02-09 12:32         ` Robert Millan
2008-02-09 12:38           ` Bean
2008-02-09 16:53         ` Christian Franke
2008-02-09 17:15           ` Bean
2008-02-10 12:17             ` Christian Franke
2008-02-08 23:14 ` Robert Millan
2008-02-08 23:32   ` Christian Franke
2008-02-09 17:04     ` Christian Franke
2008-02-09 21:59       ` Robert Millan
2008-02-09 23:04         ` Pavel Roskin
2008-02-10 13:43           ` Christian Franke
2008-02-10 15:14             ` Robert Millan
2008-02-15 22:32               ` Christian Franke
2008-02-17 13:31                 ` Robert Millan
2008-02-17 15:29                   ` Christian Franke
2008-02-18  9:04                   ` tsah marco
2008-03-01 21:05                   ` Christian Franke
2008-03-03 20:46                     ` Robert Millan
2008-03-03 22:10                       ` Christian Franke
2008-03-03 22:24                         ` Robert Millan
2008-03-07 21:20                           ` Christian Franke
2008-04-13 15:13                             ` Robert Millan
  -- strict thread matches above, loose matches on Subject: below --
2008-03-04  2:11 Kalamatee
2008-03-04  2:12 ` Kalamatee
2008-03-04  9:22 Christian Franke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.