How to install image/system when using pxe boot


#1

Hi,

I’m working on installing vyos 1.1.8 to my plenty x86 appliances, I already achieved to pxe boot these appliances with vyos, but pxe booting only live image is on the system, it means I still need to install image/system manually on the local disk, is there way to automatically archive that?

this is my pxelinux.cfg/default on my tftp server:
label vyos
kernel vmlinuz
append initrd=initrd.img console=ttyS0 console=tty0 boot=live nopersistent noautologin nonetworking nouser hostname=vyos fetch=http://192.168.20.50/vyos/live/filesystem.squashfs
ipappend 2

I got it from certain googling post, it works well but only for live system, I hope it can install system/image on local disk automatically, can it be archived by configuring append grammar above?

I’m not familiar with mechanism of vyos pxe boot, can anyone provide hint to fix that? Thanks for support in advance.

best regards.


#2

anyone have hint about it?


#3

Hi,

I found that image args support preseed file as stated in https://github.com/vyos/live-initramfs/blob/lithium/docs/parameters.txt

but no matter I use url=http://x.x.x.x/pressed.cfg or preceed/file=http://x.x.x.x/pressed.cfg, it didn’t work.

preseed file is only way I can come with post installation in VyOS of PXE boot. Anybody know how to use preseed file in VyOS’s PXE boot?

best regards.


#4

I only can advise to test all against 1.2
not likely that we will doing anything with 1.1.x


#5

Thanks for your reply. I understand, I’m not requesting it in 1.1.x, I just asked if 1.1.x or more specifically 1.1.8 support preseed file in PXE boot or not? If it supports, then how to do it? since it lacks of documentation, so I asked help in forum here.


#6

Hey, don´t get me wrong, just trying to save your time, almost for sure you will hit other issues after this one on 1.1.x
Better if we can test this against 1.2 than we will be able to help


#7

I have sort of services already deployed with vyos 1.1.8, that’s why I’m testing on it. But I also took your advice and tested this procedure with latest 1.2 rolling version, sadly, the result are same that the preseed file didn’t work.

But when testing 1.1.8, I found error message in console log as below:
chroot: can’t execute ‘dhclient’: No such file ro directory
chroot: can’t execute ‘wget’: No such file ro directory
chroot: can’t execute ‘ifconfig’: No such file ro directory

check https://github.com/vyos/live-initramfs/blob/lithium/scripts/live with line 367~384 and combined with my pxe booting menu settings:
label vyos
kernel vmlinuz
append initrd=initrd.img console=ttyS0,9600 console=tty0 boot=live fetch=http://192.168.20.50/vyos/live/filesystem.squashfs url=http://192.168.20.50/vyos/live/preseed.cfg
ipappend 2

the url parameter definitely hit the script, but somehow it didn’t work. and with 1.2 rolling version, I even can’t see the error message like this. considering most of code in live-initramfs was wrote 10 years ago, I’m not surprised that it can’t be compatible with latest version especially big change version like 1.2.


#9

Unfortunately, it seems that at this moment there is no easy way for unattended VyOS installation. We will try to find solution later and if find something then we will reply here.


#10

I was thinking about this problem at last days and I found one simple workaround. If you already can boot into VyOS from network, you can add install script to root filesystem by modifying squashfs file. For example by adding systemd oneshot unit that will install VyOS to hard drive.
It’s not perfect solution, but if you really need to roll out a lot of instances in bare metal, this can save some time.


#11

It is an option, I will give it a shot and come back, but it would be nice that VyOS originally support pxe boot like preseed in Debian or kickstart in redhat