Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 850296 Details for
Bug 891871
sys-boot/os-prober 1.80 - 1.81 - **9999 Not detecting btrfs subvolumes properly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
os-prober-btrfs-testing-v1.patch
os-prober-btrfs-testing-v1.patch (text/plain), 2.99 KB, created by
Peter Levine
on 2023-02-09 20:42:46 UTC
(
hide
)
Description:
os-prober-btrfs-testing-v1.patch
Filename:
MIME Type:
Creator:
Peter Levine
Created:
2023-02-09 20:42:46 UTC
Size:
2.99 KB
patch
obsolete
>diff -Naur a/common.sh b/common.sh >--- a/common.sh 2023-02-09 15:34:40.969171638 -0500 >+++ b/common.sh 2023-02-09 15:36:12.351270060 -0500 >@@ -172,11 +172,11 @@ > done > } > >-#check_btrfs_mounted $bootsv $bootuuid) >+#check_btrfs_mounted $bootsv $bootsig) > check_btrfs_mounted () { > bootsv="$1" >- bootuuid="$2" >- bootdev=$(blkid | grep "$bootuuid" | cut -d ':' -f 1) >+ bootsig="$2" >+ bootdev=$(blkid | grep "$bootsig" | cut -d ':' -f 1) > bindfrom=$(grep " btrfs " /proc/self/mountinfo | > grep " $bootdev " | grep " /$bootsv " | cut -d ' ' -f 5) > printf "%s" "$bindfrom" >diff -Naur a/linux-boot-prober b/linux-boot-prober >--- a/linux-boot-prober 2023-02-09 15:34:40.965171734 -0500 >+++ b/linux-boot-prober 2023-02-09 15:37:43.741903995 -0500 >@@ -98,10 +98,10 @@ > bootsv="$subvol" > elif echo "$bootmnt" | cut -d ' ' -f 3 | grep -q "btrfs"; then > # separate btrfs /boot subvolume >- bootsv=$(echo "$bootmnt" | cut -d ' ' -f 4 | grep "^subvol=" | sed "s/subvol=//" ) >- bootuuid=$(echo "$bootmnt" | cut -d ' ' -f 1 | grep "^UUID=" | sed "s/UUID=//" ) >- debug "mounting btrfs $tmpmnt/boot UUID=$bootuuid subvol=$bootsv" >- bindfrom=$(check_btrfs_mounted $bootsv $bootuuid) >+ bootsv=$(echo "$bootmnt" | cut -d ' ' -f 4 | grep "\(^\|,\)subvol=" | sed "s/.*subvol=\([^,]*\).*$/\1/") >+ bootsig=$(echo "$bootmnt" | cut -d ' ' -f 1 | grep "^\(PART\)\?\(UUID\|LABEL\)=" | sed 's/\(.*=\)\(.*\)/\1"\2"/' ) >+ debug "mounting btrfs $tmpmnt/boot $bootsig subvol=$bootsv" >+ bindfrom=$(check_btrfs_mounted $bootsv $bootsig) > if [ -n "$bindfrom" ]; then > # already mounted some place > if ! mount -o bind $bindfrom "$tmpmnt/boot" 2>/dev/null; then >@@ -111,14 +111,14 @@ > rmdir "$tmpmnt" 2>/dev/null > exit 1 > fi >- elif ! mount -o subvol=$bootsv -t btrfs -U $bootuuid "$tmpmnt/boot" 2>/dev/null; then >- warn "error mounting btrfs boot partition subvol=$bootsv, UUID=$bootuuid" >+ elif ! mount -o subvol=$bootsv -t btrfs $bootsig "$tmpmnt/boot" 2>/dev/null; then >+ warn "error mounting btrfs boot partition subvol=$bootsv, $bootsig" > umount "$tmpmnt/boot" 2>/dev/null > umount "$tmpmnt" 2>/dev/null > rmdir "$tmpmnt" 2>/dev/null > exit 1 > fi >- bootpart=$(grep " btrfs " /proc/self/mountinfo | grep " /$bootsv " | cut -d ' ' -f 10) >+ bootpart=$(grep " btrfs " /proc/self/mountinfo | grep " /${bootsv##/} " | cut -d ' ' -f 10) > else > # non-btrfs partition or logical volume > linux_mount_boot $partition $tmpmnt >diff -Naur a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2 >--- a/linux-boot-probes/mounted/common/40grub2 2023-02-09 15:34:40.930172579 -0500 >+++ b/linux-boot-probes/mounted/common/40grub2 2023-02-09 15:36:12.353270025 -0500 >@@ -20,7 +20,7 @@ > kernel=${kernel#${bsv}} > kernelfile=$kernel > initrd=${initrd#${bsv}} >- if [ "x$GRUB_FS" != "xbtrfs" ]; then >+ if [ "x$GRUB_FS" != "xbtrfs" -o "$partition" != "$bootpart" ]; then > # absolute path needed: prepend subvolume if $kernel isn't empty > kernel=${kernel:+${bsv}}${kernel} > # handle multiple initrd paths
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 891871
:
849103
|
850296
|
868957