Contribute
Register

is it possible to define the default Linux boot arguments in CLOVER?

Status
Not open for further replies.
Joined
May 15, 2011
Messages
25
Motherboard
Gigabyte Designare Z390
CPU
Core i7-9770K
Graphics
NVidia GTX-650
Mobile Phone
  1. Android
Hello,


when the clover scan procedure finds any bootable Linux Kernels, it generates dynamic boot entries where the arguments 'quiet splash' are added beside the information about root partition and initrd-file.

I would prefer to start my linux installation without a splash screen using generic network device names like 'eth0' by adding 'net.ifnames=0' instead of 'quiet splash'.

Is it possible to apply these (modified) arguments to all "Linux Kernel" search result and not only to a custom entry for a specified kernel?
 
I would first try the generic entry before any of your specific custom entries. If it does not work, a custom entry would probably be needed for each Linux custom entry.
 
I also cannot find a way to pass kernel arguments to the automatically created Linux entries, something like a default <Arguments> section that only applies for a specific OS type. Is that possible at all with Clover? if so, a config.plist snippet would we awesome.

It seems quiet splash is hardcoded somewhere in the Clover source code:

$ grep -R "quiet splash" clover
clover/rEFIt_UEFI/entry_scan/loader.c:#define LINUX_DEFAULT_OPTIONS L"ro add_efi_memmap quiet splash vt.handoff=7"
clover/rEFIt_UEFI/entry_scan/loader.c: SubEntry->LoadOptions = AddLoadOption(Entry->LoadOptions, L"quiet splash");


That exactly matches what /proc/cmdline reports after booting:

$ cat /proc/cmdline
vmlinuz-5.0.0-31-lowlatency root=/dev/disk/by-partuuid/189e48a0-802e-482e-b1a3-d3d5fad8dcb0 initrd=\boot\initrd.img-5.0.0-31-lowlatency ro add_efi_memmap quiet splash vt.handoff=7
 
Hi @lucianoiam you might want to have a look at the config.plist file I posted here a while back. It provides an example of a custom entry with arguments for Ubuntu. You'd need to adjust the volume name and path for your installation.
 
I ended up patching the Clover binary using a hex editor to change the default arguments passed to the Linux kernel. This way I do not need to create any custom boot entries while being able to remove the splash screen for automatically scanned boot entries.

First I booted Linux and searched which binaries contain the arguments hardcoded in the Clover source: ro add_efi_memmap quiet splash vt.handoff=7 (note the strings are encoded using UTF-16)

grep -Par 'r\x00o\x00 \x00a\x00d\x00d\x00_\x00e\x00f\x00i\x00_\x00m\x00e\x00m\x00m\x00a\x00p\x00 \x00q\x00u\x00i\x00e\x00t\x00 \x00s\x00p\x00l\x00a\x00s\x00h\x00 \x00v\x00t\x00.\x00h\x00a\x00n\x00d\x00o\x00f\x00f\x00=\x007\x00' /boot/efi

There should be two matching files /boot/efi/EFI/CLOVER/CLOVERX64.efi and /boot/efi/EFI/BOOT/BOOTX64.efi . Only the latter needs to be edited since it overrides the former. I changed the arguments to ro add_efi_memmap nosplash debug. Note it is a bad idea to remove bytes from an executable file so any unnecessary characters in the string should be replaced with whitespaces instead of deleted, see the attached screenshots.

Before:

Screenshot_2019-10-31_15-53-44.png


After:

Screenshot_2019-10-31_15-54-26.png
 
Status
Not open for further replies.
Back
Top