OS Installers and Booting (PXE, Jumpstart, etc.)
Table of Contents
Debian preseeding
TODO
Serial consoles
Using a USB installer image
I had some desire to easily boot Debian installers on machines with a serial console. There isn't much in the way of official images for doing this though.
This didn't work
I followed this guide: https://p5r.uk/blog/2020/instaling-debian-over-serial-console.html from 2020 with Debian 10. You need to instal the
isolinux
package as it contains a necessary binary. However this didn't work because the ISO is built for legacy BIOS.To produce a EFI bootable CD you need to follow: https://wiki.debian.org/RepackBootableISO.
That would all be pretty cool if it worked, but it does not. I gave up.
TODO
PXE boot serial consoles
One attractive alternative is to just use PXE boot where you can easily set different targets and pass appropriate kernel parameters. A nice example was provided in Matt Taggart's debian-installer preseeding.
Configuring the installed OS to use the serial console
For the machine to use serial console in normal operation you probably want to:
- configure the grub boot loader to use it
- add the serial console getty process to your inittab
- set the console variable in your kernel arguments
PXE
PXE sounds cool, but requires a cooperative DHCP server. I'm currently using my ISPs router which isn't that configurable.
Here's some info about configuring a Mikrotik router to point to a secondary machine that provides PXE boot: Mikrotik DHCP and PXE boot See RouterOS - DHCP Server - Network for documentation.
Jumpstart
Jumpstart is an amalgamation of rarpd
, tftpd
, bootparamd
, and
NFS
to boot and install Solaris over the network from the OpenBoot
PROM.
This document is largely based on these works with some modification for changes in Debian and newer Solaris releases.
- http://www.asgaur.com/wp/solaris-jumpstart-from-a-linux-server/
- https://znark.com/tech/solarisinstall.html
- https://www.thegeekdiary.com/how-to-configure-a-solaris-10-jumpstart-server-and-client-sparc/ - Solaris based
- https://www.docbert.org/Solaris/Jumpstart/ - A bit more indepth for complex installations
Overview of boot process
- OpenBoot. Boot from net device alias verbosely, and run install program.
boot net -v - install
- rarp request requests an address. rarpd returns result based on MAC address.
- Client fetches and loads boot image from tftp server at address that served the rarp result.
- Client sends a bootparams request. bootparamd returns matching key results containing NFS server and paths for install. Optional configuration may also be specified.
- Client mounts NFS directory and invokes installer.
Install and configure packages
Install packages
apt install rarpd tftpd bootparamd nfs-kernel-server
Mount the install image.
mkdir -p /jumpstart/sol10u11 mount -oro,loop sol-10-u11-ga-sparc-dvd.iso /jumpstart/sol10u11
Set hostname and IP for the client. Use the MAC from the OpenBoot banner.
echo "0:b:ad:c0:ff:ee sunfire" >> /etc/ethers echo "192.168.1.20 sunfire" >> /etc/hosts
Copy boot image to tftpd root, and link to it with hexadecimal IP address (sometimes the arch suffix might be needed.)
cp /jumpstart/sol10u11/Solaris_10/Tools/Boot/platform/sun4u/inetboot /tftpboot/inetboot.sol10u11.sun4u ln -s inetboot.sol10u11.sun4u $(printf "%02X%02X%02X%02X" 192 168 1 20) ln -s inetboot.sol10u11.sun4u $(printf "%02X%02X%02X%02X" 192 168 1 20).SUN4U
Configure the tftpd root if preferred. Debian defaults to /srv/tftp/
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
Enable remote calls for rpcbind
so that bootparamd can receive
broadcast requests.
OPTIONS="-w -r"
Configure bootparams to provide NFS server and paths.
sunfire root=192.168.1.183:/jumpstart/sol10u11/Solaris_10/Tools/Boot install=192.168.1.183:/jumpstart/sol10u11 boottype=:in rootopts=:rsize=32768
Export the jumpstart directory via NFS.
/jumpstart *(ro,no_root_squash,crossmnt,no_subtree_check)
Restart services. Export filesystems.
systemctl restart rpcbind rarpd tftpd bootparamd exportfs -a
Boot the client.
boot net -v - install