37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 89c18fac339894523134be37d986e5d63e307dff Mon Sep 17 00:00:00 2001
|
|
From: Alexander Burmashev <alexander.burmashev@oracle.com>
|
|
Date: Mon, 7 Nov 2022 02:22:12 -0800
|
|
Subject: [PATCH] Do not add /boot twice for btrfs subvolumes
|
|
|
|
Upstream does not care about btrfs subvolumes, but we do.
|
|
When grubby calculates the prefix we additionaly check:
|
|
1) if /boot fs is btrfs
|
|
2) and if /boot is a subvolume
|
|
we do not append additional /boot to kernel path.
|
|
|
|
256 is the inode nr for subvolume per BTRFS specification and docs
|
|
Without this fix grubby reports kernel path to be
|
|
/boot/boot
|
|
|
|
Orabug: 34380742
|
|
Signed-off-by: Alexander Burmashev <alexander.burmashev@oracle.com>
|
|
--- grubby-bls.old 2022-11-07 02:23:47.000000000 -0800
|
|
+++ grubby-bls 2022-11-07 04:50:09.138586241 -0800
|
|
@@ -198,10 +198,14 @@
|
|
|
|
get_prefix() {
|
|
if [[ $bootloader = grub2 ]] && mountpoint -q /boot; then
|
|
- echo "/boot"
|
|
+ prefix_kern="/boot"
|
|
else
|
|
- echo ""
|
|
+ prefix_kern=""
|
|
fi
|
|
+ if [[ $(stat -f --format=%T /boot) = "btrfs" ]] && [[ $(stat --format=%i /boot) = "256" ]]; then
|
|
+ prefix_kern=""
|
|
+ fi
|
|
+ echo "$prefix_kern"
|
|
}
|
|
|
|
expand_var() {
|