Trying to assign Ip address at boot using GRUB Menu kernel command line "ip="

I have tried to put in a static ip address in the grub boot menu and tried to add it using the command
grub2-mkconfig -o /boot/grub2/grub.cfg

It added my changes to rescue mode menu instead of my usual one.
I am just trying to assign an IP address at boot to support NBDE as I did with CentOS and Alma Linux which worked fine.

Just to be specific I have added ip=192.168.0.1::192.168.0.0:255.255.255.0:enp5s0::off in
vi /etc/default/grub file.
Then used the command grub2-mkconfig -o /boot/grub2/grub.cfg to add changes.
It did not add ip in the grub menu of my image but added it to the rescue image.

@Sirish, does NBDE = Network Bound Disk Encryption?

Is this a product equivalent to disk encryption where the keys are stored at a remote host to increase security over the boot device and any storage devices tied to those keys?

Yes, this issue occurs when using dracut with clevis and tang server to unlock the hard disk upon bootup.

https://bugs.rockylinux.org/show_bug.cgi?id=85

I’ve been banging my head on the wall over this issue.
Apparently, you’ll need to add another parameter to the kernel line - rd.neednet=1
And then it will work.

1 Like

@hetzhb , welcome to Rocky Linux Forums!

That kernel parameter looks pretty nifty. I hope to remember this post in the future when I need it.