Skip to content

Commit

Permalink
Fix grub setup to properly set fallback
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany committed Feb 27, 2024
1 parent d986262 commit 2d03536
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pkg/features/embedded/grub-config/etc/elemental/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function set_volume {
elif [ -z "${1}" ]; then
set_loopdevice /.snapshots/active
else
set img=${1}
set_loopdevice /.snapshots/${1}/snapshot.img
set img=/.snapshots/${1}/snapshot.img
set_loopdevice ${img}
fi
}

Expand All @@ -96,7 +96,8 @@ done

menuentry "${display_name} recovery" --id recovery {
set mode=recovery
set img=/recovery.img
# Define the old image path to keep compatibility
set img=/cOS/recovery.img
search --no-floppy --label --set=root ${recovery_label}
set_loopdevice ${img}
source (${volume})/etc/cos/bootargs.cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ -n "${img}" ]; then
fi

if [ "${mode}" == "recovery" ]; then
set kernelcmd="console=tty1 console=ttyS0 root=LABEL=${recovery_label} ${img_arg} elemental.mode=${mode} elemental.oemlabel=${oem_label} security=selinux selinux=0 rd.neednet=1"
set kernelcmd="console=tty1 console=ttyS0 root=LABEL=${recovery_label} elemental.image=/recovery.img elemental.mode=${mode} elemental.oemlabel=${oem_label} security=selinux selinux=0 rd.neednet=1"
else
if [ "${snapshotter}" == "btrfs" ]; then
set snap_arg="elemental.snapshotter=btrfs"
Expand Down

0 comments on commit 2d03536

Please sign in to comment.