Closed schaefi closed 5 years ago
This is just a start, I guess there might be more changes needed to make the loop boot entry more robust. See #134 for details. We are also hitting a limit here since there could be really strange system root setups which we can't tackle all. But anything we can do to increase the current code should be imho done.
The loading of the filesystem module of the rootfs should be not needed and is also flaky because the return value from blkid does not necessarily be in line with the grub module name used to support this filesystem. Therefore I deleted this part.
I just tried those two commands on my desktop system (Tumbleweed with btrfs root), and got:
# lsblk -p -n -r -o NAME,MOUNTPOINT | grep -E "/$" | uniq | cut -f1 -d" "
/dev/sda3
# findmnt -n -f -o SOURCE /
/dev/sda3[/@/.snapshots/1/snapshot]
Is the [/@/.snapshots/1/snapshot]
bit going to cause trouble?
grmbl I would say yes. The device string is used later in a blkid call. I don't think it will work with
blkid /dev/sda3[/@/.snapshots/1/snapshot]
I don't think it will work with
blkid /dev/sda3[/@/.snapshots/1/snapshot]
Correct:
# blkid /dev/sda3[/@/.snapshots/1/snapshot]
# echo $?
2
yeah we can't do it the way I thought it would be nicer :( Let's close this
Use the findmnt tool to detect the currently active root device This is related to Issue #134