grml / grml-debootstrap

wrapper around debootstrap
59 stars 27 forks source link

Non-stable grub configuration for install_devices #206

Closed mika closed 1 year ago

mika commented 1 year ago

We pass the requested --grub ... device argument to the GRUB package configuration, like:

root@grml:~# debconf-show grub-pc | grep grub-pc/install_devices
* grub-pc/install_devices: /dev/sda
  grub-pc/install_devices_failed: false
  grub-pc/install_devices_failed_upgrade: true
* grub-pc/install_devices_empty: true
  grub-pc/install_devices_disks_changed:

But the GRUB package nowadays tries to use /dev/disk/by-id/... for the install_devices setting, as can be observed by reconfiguring the package (which then automatically converts the /dev/sdX device to the proper /dev/disk/by-id/... device):

root@grml:~# dpkg-reconfigure grub-pc
grub-pc: Running grub-install ...
Installing for i386-pc platform.
Installation finished. No error reported.
  grub-install success for /dev/sda
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.1.0-7-amd64
Found initrd image: /boot/initrd.img-6.1.0-7-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
root@grml:~# debconf-show grub-pc | grep grub-pc/install_devices
  grub-pc/install_devices_disks_changed:
* grub-pc/install_devices: /dev/disk/by-id/ata-VBOX_HARDDISK_VBf4f4391c-6316fa69
  grub-pc/install_devices_failed: false
  grub-pc/install_devices_failed_upgrade: true
* grub-pc/install_devices_empty: true

Usage of /dev/disk/by-id/... is to be preferred, as this is the more stable path.

mika commented 1 year ago

Implemented at https://github.com/grml/grml-debootstrap/pull/207, needs to be tested/verified with all different kinds of configurations (Debian releases, VM use case, SW-RAID,...)