0

I've freshly installed Rocky 9.5 as a VM hosted by UTM/qemu on MacOs. It boots and can connect to the network.

However, I cannot seem to modify the grub2 configuration to modify kernel parameters.

After updating the config, reinstalling grub completely, checking the EFI boot manager, etc, it seems that it is just not reading the file at /boot/efi/EFI/rocky/grub.cfg

I want to have net.ifnames=0 biosdevname=0 permanently added to the default kernel params. After the process below, the params are there but rebooting the machine, they are not shown in /proc/cmdline.

Any ideas what's going on and how to fix?

-- Process I did:

I started by modifying /etc/default/grub :

# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rl-swap rd.lvm.lv=rl/root rd.lvm.lv=rl/swap net.ifnames=0 biosdevname=0 rhgb quiet" GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true 

Then update the boot partition: grub2-mkconfig -o /boot/grub2/grub.cfg

Confirmed that the changes are put into /boot/efi/EFI/rocky/grub.cfg :

# grep quiet /boot/efi/EFI/rocky/grub.cfg set kernelopts="root=/dev/mapper/rl-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rl-swap rd.lvm.lv=rl/root rd.lvm.lv=rl/swap net.ifnames=0 biosdevname=0 rhgb quiet " 

I also confirmed that the system will boot from the correct partition:

# efibootmgr -v BootCurrent: 0004 Timeout: 0 seconds BootOrder: 0001,0004,0002,0000,0003 Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331) Boot0001* UEFI QEMU DVD-ROM QM00001 PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y. Boot0002* UEFI QEMU HARDDISK QM00003 PciRoot(0x0)/Pci(0x1f,0x2)/Sata(1,65535,0)N.....YM....R,Y. Boot0003* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1) Boot0004* rocky HD(1,GPT,b97500fe-6a36-4d95-8d78-7703261cf0f7,0x800,0x12c000)/File(\EFI\rocky\grubx64.efi) 

1 Answer 1

0

To make things more complicated in CentOS and Rocky 9.5 they changed the way GRUB configuration parameters must be updated. With 9.5 and later /etc/default/grub and grub2-mkconfig are no longer working. Nowadays you should do it the following way:

grubby --update-kernel=ALL --args="biosdevname=0 net.ifnames=0" 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.