grub-imageboot doesn't like nonstandard image locations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub-imageboot (Debian) |
New
|
Unknown
|
|||
grub-imageboot (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
# apt-cache policy grub-imageboot grub-pc
grub-imageboot:
Installed: 0.6
Candidate: 0.6
Version table:
*** 0.6 0
500 http://
100 /var/lib/
grub-pc:
Installed: 2.02~beta2-6
Candidate: 2.02~beta2-6
Version table:
*** 2.02~beta2-6 0
500 http://
100 /var/lib/
grub-common:
Installed: 2.02~beta2-6
Candidate: 2.02~beta2-6
Version table:
*** 2.02~beta2-6 0
500 http://
100 /var/lib/
My /boot partition is rather small, so I tried an alternate location for .iso/.img files:
-----
# cat /etc/default/
# Where to find the iso/floppy images
IMAGES=
# You can override the boot options for iso/floppy images here
# see http://
#IMAGEOPTS="rawimg"
#ISOOPTS="iso"
-----
update-grub2 finds everything:
-----
# update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.elf
Found memdisk: /memdisk
Found iso image: /var/lib/
Found iso image: /var/lib/
Found floppy image: /var/lib/
done
-----
When I reboot, I get:
-----
+-----
| Ubuntu |
| Advanced options for Ubuntu |
| Memory test (memtest86+) |
| Memory test (memtest86+, serial console 115200) |
|*Bootable ISO Image: biosupdate |
| Bootable ISO Image: grml64-full_2013.09 |
| Bootable Floppy Image: netboot |
| |
| |
| |
| |
| |
+-----
Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands
before booting or `c' for a command-line.
-----
I select one of the image options, and get:
-----
error: file `/memdisk' not found.
-----
I reboot, and edit the commandline:
-----
setparams 'Bootable ISO Image: biosupdate' |
| |
| insmod part_msdos |
| insmod lvm |
| insmod ext2 |
| set root='lvmid/
|dXRK-
| if [ x$feature_
| search --no-floppy --fs-uuid --set=root --hint=
|-Fpvd-
|c9-ad18-
| else |v
+-----
|dXRK-
| if [ x$feature_
| search --no-floppy --fs-uuid --set=root --hint=
|-Fpvd-
|c9-ad18-
| else |
| search --no-floppy --fs-uuid --set=root c12575c9-
|84c2556499b |
| fi |
| linux16 /boot/memdisk iso |
| initrd16 /var/lib/
| |
+-----
Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
a command-line or ESC to discard edits and return to the GRUB menu.
-----
--> it works
When I set the image location back to the default of /boot/images, everything works as expected:
-----
root@zimba:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.elf
Found memdisk: /memdisk
Found iso image: /boot/images/
done
-----
The problem is that the grub root is set incorrectly if images are configured to reside outside /boot, and/or that memdisk isn't copied to IMAGEPATH/memdisk. MEMDISKPATH
-----
$ diff -ur grub.cfg-bootpart grub.cfg-varpart
--- grub.cfg-bootpart 2014-02-07 15:24:11.261689248 +0100
+++ grub.cfg-varpart 2014-02-07 15:25:32.661693188 +0100
@@ -284,16 +284,43 @@
### END /etc/grub.
### BEGIN /etc/grub.
-menuentry "Bootable Floppy Image: dosdisk32M" {
+menuentry "Bootable ISO Image: biosupdate" {
insmod part_msdos
+ insmod lvm
insmod ext2
- set root='hd0,msdos1'
+ set root='lvmid/
if [ x$feature_
- search --no-floppy --fs-uuid --set=root --hint-
+ search --no-floppy --fs-uuid --set=root --hint=
else
- search --no-floppy --fs-uuid --set=root a96dc997-
+ search --no-floppy --fs-uuid --set=root c12575c9-
+ fi
+ linux16 /memdisk iso
+ initrd16 /var/lib/
+}
-----
It is not entirely clear to me if the problem is in grub-imageboot or /usr/lib/
Changed in grub-imageboot (Debian): | |
status: | Unknown → New |
Status changed to 'Confirmed' because the bug affects multiple users.