Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatible recovery boot configuration #2030

Merged
merged 1 commit into from
Mar 25, 2024
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}
}
Loading