Skip to content

Allow ${srv} in the kernel cmdline #1321

Open
@alkisg

Description

@alkisg

Hi, please allow the ${srv} keyword in the kernel cmdline, replacing it with the boot server IP.
For example, nfsroot=${srv}:/srv/ltsp/raspbian would be passed to the kernel as nfsroot=192.168.67.1:/srv/ltsp/raspbian.
This will allow netbooting Raspberries from a server with a dynamic IP, which is the default in LTSP.

Rationale.
A typical netbooting procedure on Raspberries is as follows:

  • The Pi does a DHCP request; a real and/or a proxy DHCP server might reply
  • Bootcode.bin, cmdline.txt, the kernel etc are fetched from TFTP
  • The kernel is loaded and the cmdline is passed to it

At that point, the DHCP offer packet contents are lost, so there's no way for the kernel to discover the proxyDHCP server and connect to it via nfsroot=. In iPXE (ipxe.org), this is done with the ${srv} variable. In PXELinux, IPAPPEND passes the server in the ip= variable. Raspberries should offer one of those solutions, and the one offered by iPXE is the most flexible.

Note that Raspberries by default do not use the initramfs, so we cannot develop and add programs that would discover the PXE server; this information needs to be passed to the kernel before any userland code has a chance to run.

Of course it's understandable that this solution wouldn't reach rpi3 ROMs and an SD card would be needed there. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions