Do not add /boot twice for btrfs subvolumes
This commit is contained in:
commit
f17fda0a79
15
config.yaml
Normal file
15
config.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
actions:
|
||||||
|
- modify_release:
|
||||||
|
- suffix: ".alma.1"
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- changelog_entry:
|
||||||
|
- name: "Eduard Abdullin"
|
||||||
|
email: "eabdullin@almalinux.org"
|
||||||
|
line:
|
||||||
|
- "Do not add /boot twice for btrfs subvolumes"
|
||||||
|
|
||||||
|
- add_files:
|
||||||
|
- type: "patch"
|
||||||
|
name: "Do-not-add-boot-twice-for-btrfs-subvolumes_raw_source_applied.patch"
|
||||||
|
number: "Latest"
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
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() {
|
||||||
Loading…
Reference in New Issue
Block a user