update-grub 10_linux_zfs fails when /usr is a separate filesystem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Incomplete
|
Low
|
Unassigned | ||
grubzfs-testsuite (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 20.04.1 LTS
Release: 20.04
grub-common: 2.04-1ubuntu26.4
I expect grub-update to create grub.cfg with Linux entries for ZFS. Instead I am left with an empty list and an unbootable OS.
The output from update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/
Sourcing file `/etc/default/
Generating grub configuration file ...
/etc/grub.
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
This is failing because I have a separate ZFS filesystem for /usr. The 10_linux_zfs script is gathering information from /etc/os-release which is a symlink to ../usr/
The first issue I see in 10_linux_zfs is under function get_dataset_info() at line 382:
mount -o noatime,zfsutil -t zfs "${base_dataset}" "${mntdir}"
Since /usr is under a separate filesystem, the symlink would be broken and the script fails. This should mount /usr as well if it is a separate filesystem.
The next issue I see is when the script iterates the zsys snapshots at line 514:
for snapshot_dataset in $(zfs list -H -o name -t snapshot "${dataset}"); do
boot_
done
You would get a similar error message about os-release.
/etc/grub.
Again, the script should consider reading the /usr snapshot as well if it is a separate filesystem.
tags: | added: rls-ff-incoming |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Low |
tags: | removed: rls-ff-incoming |
Status changed to 'Confirmed' because the bug affects multiple users.