You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a following partitions layout:
sda1 - esp
sda2 - LUKS
Inside LUKS I have LVM
Inside LVM I have regular volume "BOOT" and lvm-thin pool "THIN"
Inside THIN lvm-thin pool I have "ROOT" volume containing BTRFS.
If I run update-grub - snapshots-btrfs GRUB hook fails at root_fs=$(${grub_probe} --target="fs" /) due to set -e at the beginning of snapshots-btrfs GRUB hook without any error messages (which is awful).
If I run grub-probe --target="fs" / manually - I got following error:
grub-probe: error: disk `lvmid/DGpbHM-b8Aa-beeT-SQpo-12lY-d7a3-WGZSGu/uBMaVC-mZVD-eZjJ-GoK9-KY7P-1oRw-4lcagj' not found.
This error occurs because GRUB can't yet handle lvm-thin volumes (and because of this I have separate BOOT volume in LVM).
But the main issue is update-grub silently fails because of snapshots-btrfs GRUB hook.
Fix is simple - do not evaluate grub-probe result into variable, but use it directly in test clause:
Hello.
I have a following partitions layout:
sda1 - esp
sda2 - LUKS
Inside LUKS I have LVM
Inside LVM I have regular volume "BOOT" and lvm-thin pool "THIN"
Inside THIN lvm-thin pool I have "ROOT" volume containing BTRFS.
If I run update-grub - snapshots-btrfs GRUB hook fails at
root_fs=$(${grub_probe} --target="fs" /)
due toset -e
at the beginning ofsnapshots-btrfs
GRUB hook without any error messages (which is awful).If I run
grub-probe --target="fs" /
manually - I got following error:This error occurs because GRUB can't yet handle lvm-thin volumes (and because of this I have separate BOOT volume in LVM).
But the main issue is update-grub silently fails because of
snapshots-btrfs
GRUB hook.Fix is simple - do not evaluate grub-probe result into variable, but use it directly in test clause:
Failure of commands in test clause in Bash does not trigger set -v error and can be handled in script to exit gracefully.
The text was updated successfully, but these errors were encountered: