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

Change location of bootargs.conf #2013

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions pkg/features/embedded/grub-config/etc/elemental/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ function set_loopdevice {
loopback ${volume} ${1}
}

## Sources bootargs from the current volume
function source_bootargs {
source (${volume})/etc/cos/bootargs.cfg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this failing if the file is not there? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not when I tried it.. I was going to check if the file existed first but seems like it's not needed 🤷

source (${volume})/etc/elemental/bootargs.cfg
}

## Defines the volume and image to boot from for active or passive boots
function set_volume {
if [ "${snapshotter}" == "btrfs" ]; then
Expand All @@ -78,7 +84,7 @@ menuentry "${display_name}" --id active {
set mode=active
search --no-floppy --label --set=root ${state_label}
set_volume
source (${volume})/etc/cos/bootargs.cfg
source_bootargs
linux (${volume})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_active_cmdline}
initrd (${volume})${initramfs}
}
Expand All @@ -88,7 +94,7 @@ for passive_snap in ${passive_snaps}; do
set mode=passive
search --no-floppy --label --set=root ${state_label}
set_volume ${passive_snap}
source (${volume})/etc/cos/bootargs.cfg
source_bootargs
linux (${volume})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_passive_cmdline}
initrd (${volume})${initramfs}
}
Expand All @@ -105,7 +111,7 @@ menuentry "${display_name} recovery" --id recovery {
fi

set_loopdevice ${img}
source (${volume})/etc/cos/bootargs.cfg
source_bootargs
linux (${volume})${kernel} ${kernelcmd} ${extra_cmdline} ${extra_recovery_cmdline}
initrd (${volume})${initramfs}
}
Loading