netbootxyz / netboot.xyz

Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
https://netboot.xyz
Apache License 2.0
9.22k stars 684 forks source link

VyOS does not boot with manual IP configuration #1231

Open b- opened 1 year ago

b- commented 1 year ago

Describe the bug

If there isn’t a good DHCP server on the network, booting VyOS from netboot.xyz results in hanging in the initrd. The VyOS option in the iPXE menu doesn’t pass the manual IP configuration that was given to NetBoot.xyz into the kernel cmdline as required, so it always attempts DHCP.

To Reproduce Steps to reproduce the behavior:

  1. Disable your DHCP server (or go on, say, a VPS without one)
  2. Attempt to boot VyOS from the NetBoot.xyz install menu

Expected behavior

VyOS should boot up to the VyOS login prompt, rather than getting stuck in initrd and dropping to a shell.

Screenshots

Additional context

I was chatting in an IRC room about this with a couple of people who figured out how to get it to actually boot. An excerpt from the convo with censored nicks stating how to specify a static IP address: 02:01 AM bri: also according to usr/bin/boot/9990-netbase.sh 02:01 AM there is a way to specify static address 02:03 AM STATICIP=ifname,ifaddress,ifnetmask,ifgateway,nameserver

I’ll try to see if I can figure this out more myself tomorrow and maybe open a PR, but I thought that opening an issue now would help a lot, too, especially in case I forget.

antonym commented 1 year ago

Good info, you should be able to add it to the kernel command line via the utiltiies menu and then start it if you want to test if STATICIP= works. It sets a ${cmdline} var that adds additional params to the booting line of the kernel.

b- commented 1 year ago

Hm, it doesn't seem to be picking up the STATICIP= parameter -- I tried STATICIP=e2,172.23.217.102,255.255.255.224,172.23.217.97,1.1.1.1 but it still goes to DHCP configuration.

image

image

The same thing happens if I use eth0 as the device name i.e., STATICIP=eth0,172.23.217.102,255.255.255.224,172.23.217.97,1.1.1.1 image image

I think something is hacked up in the vyos/live-boot init scripts that breaks the static IP functionality :shrug:

CionSiu commented 2 months ago

Has this issue been updated? my vps(no dhcp server) had the same problem when I tried to install vyos via netboot yesterday.