Package: grub-imageboot
Severity: wishlist

Currently, there is only one google hit for „"rawimg" linux16"” (a copy
of grub-imageboot's extracted source code) and all documentation I was
able to find, including your blog entry, uses "raw" instead.  Thus,
I assume the below quoted line is just a typo.

| test -z "$IMAGEOPTS" && IMAGEOPTS="rawimg"

Please undo this typo in bin/60_grub-imageboot and also adapt
etc/grub-imageboot accordingly if I'm right.


grub-imageboot uses "iso" as option to boot .iso files and it does not
use "raw".  To be able to use an iso image containing a firmware upgrade
tool, I needed to add "raw" manually, so using both is at least not
always wrong.

The type of .img files is automatically determined by memdisk. Depending
on the size of the file, it is either detected as floppy image or as
harddisk image.  To let the user decide which type of image the file is,
either "floppy" or "harddisk" would need to be added as option, similar
to "iso" which is used for .iso files.  This could be implemented by
adding new file name extensions ".floppy" and ".harddisk", i.e., an
image file "asdf.floppy" would be booted as floppy image,
"asdf.harddisk" would be booted as harddisk image and how to boot
"asdf.img" would be automatically determined by memdisk.

As described above, grub-imageboot does not add (as I would have
expected) the type of the image as option for .img files, but instead
adds an option ("raw") that tells memdisk how to enter protected mode.

I don't understand why "raw" is passed to harddisk and floppy images by
default, but not to iso images.  If there is a reason to do so, please
document it, otherwise please adapt the behaviour.


Besides "raw", there are other options that might be needed to boot some
images on specific computers (see /usr/share/doc/syslinux/memdisk.txt.gz
for details).  If an option is required to boot image A but must not be
used to be able to boot image B, there is currently no way to tell
grub-imageboot to do so.

Two ways to make grub-imageboot more configurable that come to my mind
are:
 * read options for ${imagefile} from ${imagefile}.config if it exists
 * let the users add additional file name extensions with custom options
   in /etc/default/grub-imageboot, e.g., .raw-hdd, which uses "raw" and
   "harddisk" as options

The latter could be implemented like this:
| set -e
|
| . /usr/lib/grub/grub-mkconfig_lib
|
| imageboot_add_extension() {
|     ...
| }
|
| IMAGES=/boot/images
|
| if [ -e "/etc/default/grub-imageboot" ]
| then
|     . /etc/default/grub-imageboot
| fi
|
| ...

Users could use imageboot_add_extension in /etc/default/grub-imageboot
to add custom extensions.

I don't have an idea how imageboot_add_extension would look like exactly
yet, though.


Carsten



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to