Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRUB: use persistent device names under /dev/disk/by-id/ for install_devices #207

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

mika
Copy link
Member

@mika mika commented Mar 31, 2023

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

| # debconf-show grub-pc | grep grub-pc/install_devices: | * grub-pc/install_devices: /dev/sda

But the GRUB package tries to use /dev/disk/by-id/... for install_devices setting (since 2010 and Debian/squeeze AFAICS), as can be observed by reconfiguring the GRUB package (which then automatically converts the /dev/sdX to the proper /dev/disk/by-id/... device when being asked in the debconf prompt):

| # dpkg-reconfigure grub-pc
| grub-pc: Running grub-install ...
| [...]
| # debconf-show grub-pc | grep grub-pc/install_devices: | * grub-pc/install_devices: /dev/disk/by-id/ata-VBOX_HARDDISK_VBf4f4391c-6316fa69

The available_ids() and device_to_id() helper functions are based on code by Colin Watson cjwatson@debian.org in GRUB's postinst script of the Debian package, see git commits 4830efd9e + ce2a43c85 at https://salsa.debian.org/grub-team/grub.git.

Closes: #206

…devices

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

| # debconf-show grub-pc | grep grub-pc/install_devices:
| * grub-pc/install_devices: /dev/sda

But the GRUB package tries to use /dev/disk/by-id/... for
install_devices setting (since 2010 and Debian/squeeze AFAICS), as can
be observed by reconfiguring the GRUB package (which then automatically
converts the /dev/sdX to the proper /dev/disk/by-id/... device when
being asked in the debconf prompt):

| # dpkg-reconfigure grub-pc
| grub-pc: Running grub-install ...
| [...]
| # debconf-show grub-pc | grep grub-pc/install_devices:
| * grub-pc/install_devices: /dev/disk/by-id/ata-VBOX_HARDDISK_VBf4f4391c-6316fa69

The available_ids() and device_to_id() helper functions are based on
code by Colin Watson <cjwatson@debian.org> in GRUB's postinst script
of the Debian package, see git commits 4830efd9e + ce2a43c85 at
https://salsa.debian.org/grub-team/grub.git.

Closes: #206
@mika mika changed the title GRUB: use persistent device names under /dev/disk/by-id/ for install_… GRUB: use persistent device names under /dev/disk/by-id/ for install_devices Mar 31, 2023
@mika mika merged commit 5825f1a into master Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-stable grub configuration for install_devices
1 participant