mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
kexec-parse-boot/bls: Strip boot dir from front of grub entries (#804)
Some grub configs/bls entries contain the full paths to the kernel/initrd files, which the parsers currently fail to handle, causing a failed boot without any useful error being presented to the user. To fix this, strip the bootdir prefix from the menu entries when parsing, should it exist. Test: build/boot Librem 13v2 w/F32 and bls entries containing absolute paths. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
f23ced0a3b
commit
a075347351
@ -67,10 +67,10 @@ bls_entry() {
|
|||||||
name=$val
|
name=$val
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
kernel=$val
|
kernel=${val#"$bootdir"}
|
||||||
;;
|
;;
|
||||||
initrd*)
|
initrd*)
|
||||||
initrd=$val
|
initrd=${val#"$bootdir"}
|
||||||
;;
|
;;
|
||||||
options)
|
options)
|
||||||
# default is "options $kernelopts"
|
# default is "options $kernelopts"
|
||||||
|
@ -170,11 +170,11 @@ syslinux_entry() {
|
|||||||
state="search"
|
state="search"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
kernel="$val"
|
kernel="${val#"$bootdir"}"
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
initrd* | INITRD* )
|
initrd* | INITRD* )
|
||||||
initrd="$val"
|
initrd="${val#"$bootdir"}"
|
||||||
;;
|
;;
|
||||||
append* | APPEND* )
|
append* | APPEND* )
|
||||||
if [ "$kexectype" = "multiboot" -o "$kexectype" = "xen" ]; then
|
if [ "$kexectype" = "multiboot" -o "$kexectype" = "xen" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user