forked from pool/os-prober
815da4652d
- UEFI Grub does not insert Arch Linux entry correctly (boo#1101942) * os-prober-multiple-initrd.patch OBS-URL: https://build.opensuse.org/request/show/639715 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=85
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
Index: os-prober/linux-boot-probes/mounted/common/40grub2
|
|
===================================================================
|
|
--- os-prober.orig/linux-boot-probes/mounted/common/40grub2
|
|
+++ os-prober/linux-boot-probes/mounted/common/40grub2
|
|
@@ -19,11 +19,11 @@ entry_result () {
|
|
# if path is not relative to subvolume make it relative
|
|
kernel=${kernel#${bsv}}
|
|
kernelfile=$kernel
|
|
- initrd=${initrd#${bsv}}
|
|
+ initrd=`echo $initrd | sed -e "s!^${bsv}!!" -e "s!\\(\\s\\)${bsv}!\\1!g"`
|
|
if [ "x$GRUB_FS" != "xbtrfs" -o "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" != "xtrue" ]; then
|
|
# absolute path needed: prepend subvolume if $kernel isn't empty
|
|
kernel=${kernel:+${bsv}}${kernel}
|
|
- initrd=${initrd:+${bsv}}${initrd}
|
|
+ initrd=`echo $initrd | sed -e "s!\\(\\S\\+\\)!${bsv}\\1!g"`
|
|
fi
|
|
# assumed: rootsv != bootsv if rootsv isn't ancestor of bootsv
|
|
[ "$partition" != "$bootpart" -o "$rootsv" != "$bootsv" ] && kernelfile="/boot${kernelfile}"
|
|
@@ -105,10 +105,11 @@ parse_grub_menu () {
|
|
fi
|
|
;;
|
|
initrd|initrdefi|initrd16)
|
|
- initrd="$(echo "$2" | sed 's/(.*)//')"
|
|
+ shift
|
|
+ initrd="$(echo "$@" | sed 's/(\S*)//g')"
|
|
# Initrd same.
|
|
if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then
|
|
- initrd="/boot$initrd"
|
|
+ initrd=`echo $initrd | sed -e 's!\(\S\+\)!/boot\1!g'`
|
|
fi
|
|
;;
|
|
"}")
|