Skip to content
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
18 changes: 16 additions & 2 deletions live/live-root/usr/bin/kernel-cmdline-conf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash

# Script to clean kernel command line from agama specific parameters. Result is later used for bootloader proposal.

Expand All @@ -12,18 +12,32 @@ write_kernel_args() {
# if there is no kernel params
touch "${TARGET}"

# silence the "To read lines rather than words..." hint
# shellcheck disable=SC2013
for _i in $(cat "${SOURCE}"); do
case ${_i} in
# remove all agama kernel params
# Add here also all linuxrc supported parameters
LIBSTORAGE_* | YAST_* | inst* | agama* | live* | Y2* | ZYPP_* | autoyast*)
_found=1
;;
# remove the Kiwi PXE boot options or Live options
rd.kiwi.* | rd.live.* | ramdisk_size=* | initrd=* | BOOT_IMAGE=*)
_found=1
;;
# remove the network configuration options
# https://man7.org/linux/man-pages/man7/dracut.cmdline.7.html
ip=* | rd.route=* | bootdev=* | BOOTIF=* | rd.bootif=* | nameserver=* | \
rd.peerdns=* | rd.neednet=* | vlan=* | bond=* | team=* | bridge=*)
_found=1
;;
esac

if [ -z "$_found" ]; then
echo "Non-Agama parameter found ($_i)"
echo "Using boot parameter \"$_i\""
echo -n " $_i" >>"${TARGET}"
else
echo "Ignoring boot parameter \"$_i\""
fi
unset _found
done
Expand Down
7 changes: 7 additions & 0 deletions live/src/agama-installer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Apr 24 15:11:35 UTC 2025 - Ladislav Slezák <[email protected]>

- Filter out the special PXE boot parameters, do not pass them
to the installed system. Remove also most of the network
settings (gh#agama-project/agama#2280)

-------------------------------------------------------------------
Wed Apr 23 08:39:34 UTC 2025 - Ladislav Slezák <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion live/test/fixtures/expected/cmdline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BOOT_IMAGE=/boot/vmlinuz splash=silent mitigations=auto quiet nosimplefb=1
splash=silent mitigations=auto quiet nosimplefb=1
Copy link
Contributor

Choose a reason for hiding this comment

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

well, to be sure I would enhance test with various parameters we are using like some rd.kiwi params and some oh others which are more tricky to be sure that regexp matching

2 changes: 1 addition & 1 deletion live/test/fixtures/source/cmdline
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BOOT_IMAGE=/boot/vmlinuz splash=silent agama.auto=ftp://example.suse.cz/profile.json LIBSTORAGE_MULTIPATH=1 mitigations=auto Y2DEBUG=1 quiet nosimplefb=1
BOOT_IMAGE=/boot/vmlinuz initrd=/boot/initrd rd.kiwi.install.pxe rd.kiwi.install.image=http://example.com/agama-installer.x86_64-42.0.0.xz ip=eth0:10.42.0.42 splash=silent agama.auto=ftp://example.suse.cz/profile.json LIBSTORAGE_MULTIPATH=1 mitigations=auto Y2DEBUG=1 quiet nosimplefb=1