UP  |  HOME

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

Follow How-To set up a serial console on Debian

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.

Overview of boot process

  1. OpenBoot. Boot from net device alias verbosely, and run install program.
boot net -v - install
  1. rarp request requests an address. rarpd returns result based on MAC address.
  2. Client fetches and loads boot image from tftp server at address that served the rarp result.
  3. Client sends a bootparams request. bootparamd returns matching key results containing NFS server and paths for install. Optional configuration may also be specified.
  4. 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/

Listing 1: /etc/inetd.conf
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.

Listing 2: /etc/default/rpcbind
OPTIONS="-w -r"

Configure bootparams to provide NFS server and paths.

Listing 3: /etc/bootparams
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.

Listing 4: /etc/exports
/jumpstart *(ro,no_root_squash,crossmnt,no_subtree_check)

Restart services. Export filesystems.

systemctl restart rpcbind rarpd tftpd bootparamd
exportfs -a

Boot the client.

At ok prompt
boot net -v - install