update-grub fails when having multiple encrypted zfs root datasets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
== Test Case ==
1. Have a multi-boot linux setup installed on zfs
2. Use external boot partition
3. Use encryption (using diffent keys) for each zfs root dataset
4. Boot into one environment without loading key of other dataset
5. Run update-grub
In our case we have 2 root datasets. We're booted into /legion/work/root
/legion/
/legion/work/root
* Expected Result *
update-grub succeeds updating grub config file with (at least) currently booted environment in configuration file.
* Actual Result *
update-grub fails, effectively updating config file removing currently booted environment from grub config.
update-grub output:
$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/
Generating grub configuration file ...
filesystem 'legion/
Adding boot menu entry for UEFI Firmware Settings
done
* Workaround / Fix *
A nice fix would be to add flag to either ignore datasets without loaded key. As I'm not interested in having personal root dataset listed in grub I added a workaround in "/etc/grub.
Original expression: zfs list -H -o name,canmount,
Modified expression: zfs list -H -o name,canmount,
---
ProblemType: Bug
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
DistroRelease: Ubuntu 20.04
NonfreeKernelMo
Package: grub2 (not installed)
ProcVersionSign
Tags: focal
Uname: Linux 5.4.0-80-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirt lpadmin plugdev sudo
_MarkForUpload: True
---
ProblemType: Bug
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
DistroRelease: Ubuntu 20.04
NonfreeKernelMo
Package: grub2 (not installed)
ProcVersionSign
Tags: focal
Uname: Linux 5.4.0-80-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirt lpadmin plugdev sudo
_MarkForUpload: True
Changed in grub2 (Ubuntu): | |
status: | New → Triaged |
Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1938635
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https:/ /wiki.ubuntu. com/ReportingBu gs.
(no release, grub2 package details etc details were provided)