Skip to content

Commit 4ff9ec2

Browse files
author
Nathan Parsons
committed
Add support for the kernel being within a btrfs subvolume
- /boot may be within a named root subvolume (eg. "/@/boot") - /boot may be in its own subvolume (eg. "/@boot")
1 parent 21af561 commit 4ff9ec2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spectre-meltdown-checker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,9 @@ if [ "$opt_live" = 1 ]; then
13091309
if [ -r /proc/cmdline ] && grep -q 'BOOT_IMAGE=' /proc/cmdline; then
13101310
opt_kernel=$(grep -Eo 'BOOT_IMAGE=[^ ]+' /proc/cmdline | cut -d= -f2)
13111311
_debug "found opt_kernel=$opt_kernel in /proc/cmdline"
1312+
# if the boot partition is within a btrfs subvolume, strip the subvolume name
1313+
# if /boot is a separate subvolume, the remainder of the code in this section should handle it
1314+
if echo "$opt_kernel" | grep -q "^/@"; then opt_kernel=$(echo "$opt_kernel" | sed "s:/@[^/]*::"); fi
13121315
# if we have a dedicated /boot partition, our bootloader might have just called it /
13131316
# so try to prepend /boot and see if we find anything
13141317
[ -e "/boot/$opt_kernel" ] && opt_kernel="/boot/$opt_kernel"

0 commit comments

Comments
 (0)