Skip to content

Non LTSP iPXE entries

Michael Pope edited this page Mar 22, 2022 · 10 revisions

The following non-LTSP related entries can be used in /srv/tftp/ltsp.ipxe. Hint, if you want to have a customized ltsp.ipxe and yet to be able to use ltsp ipxe in order to update it, you may do:

cp /usr/share/ltsp/server/ipxe/ltsp.ipxe /usr/share/ltsp/server/ipxe/ltsp-en.ipxe

After that, ltsp-en.ipxe will be used as the template source for ltsp ipxe, so you may put the following entries there. The -en part comes from LANGUAGE, use the appropriate one for your locale.

Ubuntu isos without LTSP mode:

To netboot Ubuntu isos without LTSP mode, run the following commands:

mkdir /srv/ltsp/cdrom
mount -o loop,ro ubuntu-12.04.5-desktop-i386.iso /srv/ltsp/cdrom
ltsp kernel cdrom

NOTE: Tested 21.10 64bit and that also worked.

Optional add to /etc/fstab for automatic mounting

/srv/ltsp/isos/ubuntu-12.04.5-desktop-i386.iso   /srv/ltsp/cdrom        iso9660 loop,ro 0 0

And create the following iPXE entry to /usr/share/ltsp/server/ipxe/ltsp-en.ipxe:

Add menu item just after Other options

item --key u cdrom               Ubuntu 21.10 64bit ISO

Add logic

:cdrom
set cmdline root=/dev/nfs nfsroot=${srv}:/srv/ltsp/${img} netboot=nfs boot=casper ip=dhcp
kernel /ltsp/${img}/vmlinuz initrd=ltsp.img initrd=initrd.img ${cmdline}
initrd /ltsp/${img}/initrd.img
boot || goto failed

Update ipxe

ltsp ipxe

For better NFS speed you may also run systemctl edit nfs-kernel-server on the server, and add:

[Service]
ExecStartPre=sh -c 'echo 32768 > /proc/fs/nfsd/max_block_size' 

Or, alternatively, you may add the following parameters in iPXE:

  • For Ubuntu <= 12.04: NFSOPTS="-o rsize=32768,wsize=32768"
  • For Ubuntu >= 14.04: NFSOPTS="rsize=32768,wsize=32768"

Note that some Ubuntu 18.04 versions were affected by this bug and end up in recovery console; see my comment there to overcome this.