0

Multiple sources, including this one, mention using the IP variable in initramfs.conf to set a static IP address in the pre-boot environment, and I have used this successfully in the past. However, the man page for initramfs doesn't mention it, and I can't find any documentation for it. Is there any? If so where?

1

This should be the missing pieces:

man page initramfs.conf(5) (Debian buster)

VARIABLES FOR NFS BOOT

DEVICE

Specifies the default network interface to use, like eth0. The ip or BOOTIF bootargs may override this.


man page initramfs-tools(7) (Debian buster)

ip
tells how to configure the ip address. Allows one to specify an different NFS server than the DHCP server. See Documentation/filesystems/nfsroot.txt in any recent Linux source for details. Optional parameter for NFS root.


https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt:

ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:
   <dns0-ip>:<dns1-ip>:<ntp0-ip>

This parameter tells the kernel how to configure IP addresses of devices and also how to set up the IP routing table. It was originally called nfsaddrs, but now the boot-time IP configuration works independently of NFS, so it was renamed to ip and the old name remained as an alias for compatibility reasons.

If this parameter is missing from the kernel command line, all fields are assumed to be empty, and the defaults mentioned below apply. In general this means that the kernel tries to configure everything using autoconfiguration.

...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.