--grub-setup=/bin/true worked nice! Nailed it down to two issues now.

1)
When I used grub-mkconfig (at that time with -o 
/media/<label>/boot/grub/grub.cfg" but shouldn't matter) it did create a faulty 
grub.cfg however. It probably looked in /boot/grub for the device.map (as it 
does not support --grub-root-directory), and probably because the kernel had at 
that time chosen /dev/hdc for the disk where /boot is on and the devicemap 
contained only sda and sdb entries, the grub.cfg written contained "root 
(hd2,?)" lines. (bios howerer makes the boot device to be hd0)

I think the the first error I posted might even stem from this same
situation (and me doing an regular update-grub/ while the disks had been
detected in another order and the device map got incorrect /
insufficient.

* Maybe grub-mkconfig could output the mapping it uses?
* Can the device.map support "(hd0) UUID=" lines to identify disks?

2)
It seems I actually only got away with copying /boot (including grub.cfg) to a 
usb stick because the partition numbers of the /boot partitions on the usb 
stick are the same as on the regular boot device. The kernels end up being in 
(hd0,X) on boot again.

This means in order to support creating rescue boot partitions:

* It seems grub-mkconfig really needs a --grub-root-directory option.
(A --grub-boot-directory option would be even nicer. Then kernels can be
kept in the root of that partition just like in a regular /boot
partition, instead of in <mountpoint>/boot.)

* grub-install could have a --copy-boot-dir option that would copy all
files from /boot (kernels, initramfs, etc.) but not directories into
<grub-rootdirectory>/boot or <grub-boot-directory>.

-- 
failures on grub-install to create rescue boot media
https://bugs.launchpad.net/bugs/498533
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to