Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions pkg/features/embedded/grub-config/etc/elemental/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,16 @@ menuentry "${display_name} recovery" --id recovery {

# Check the presence of the image and fallback to legacy path if not present
set img=/recovery.img
if [ ! -f "${img}" ]; then
if [ -f "${img}" ]; then
source (${root})/boot/bootargs.cfg
linux (${root})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_recovery_cmdline}
initrd (${root})${initramfs}
else
# Boot using legacy recovery system, everything is included in the loopback image.
set img=/cOS/recovery.img
set_loopdevice ${img}
source_bootargs
linux (${volume})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_recovery_cmdline}
initrd (${volume})${initramfs}
fi

source (${root})/boot/bootargs.cfg
linux (${root})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_recovery_cmdline}
initrd (${root})${initramfs}
}