Skip to content
Snippets Groups Projects

Fix wrong or empty bootdev value for grub-pc (#1035096)

Merged Pascal Hambourg requested to merge pham/grub-installer:wrong-bootdev into master

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035096

grub-installer may generate a wrong bootdev value for grub-pc when state=2 and previous_state!=1. This may happen at least in the following three cases if the user selects the device in the proposed list:

  • if default_bootdev is the installation media (/cdrom or /hd-media) or has no known partition table nor filesystem, bootdev will be the disk containing /boot instead of the device selected by the user;
  • if unsupported OS are detected by os-prober, bootdev will be empty;
  • if the user answers "no" to "Install the GRUB boot loader to your primary drive?", bootdev will be empty.

It does not happen if the user chose "Enter the device manually".

The common root cause is grub-installer/bootdev being used without being set by the user even after bootdev was set by select_bootdev. This minimal patch uses grub-installer/bootdev only after being set by the user.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading