so, every now and then a new installation has to be made.
The machines to be installed are typically 150km away, but equipped with a serial
console and an remote power switch. So I grabed an idea from
few month ago and tried to use the 6.2-Release bootonly image.
The usual first steps:
- set up an dhcp server on a machine on the same broadcast domain
- enable the tftp server to serve the pxeboot file
- set up an nfs server serving /data/export/pxeinstall
- unpacking the FreeBSD 6.2 bootonly image into /data/export/pxeinstall
- to work on the serial console add the file /data/export/pxeinstall/boot.config
But
the first tests where very disappointing. No booting of the kernel on
the serial console and after a timeout the machine rebooted
automatically.
A few tests later within the testlab at home I found out this two problems:
- pxeboot did not care for the /boot.config file as the loader too,
because on standard usage this file is read by the first stage of the
boot loader (the BTX loader) which is not needed on pxe boot.
- after kernel start he tries to mount /data/export/pxeinstall from
the nfs server as root disk. But the right root disk have to be
the preloaded mfsroot image.
Using wireshark to analyse the data flow told me that he actually try to use an nonexistant /etc/fstab to determin the position of the root filesystem. Adding /data/export/pxeinstall/etc/fstab pointing to /dev/md0 as root device was sufficent to get to boot the right way.
The other question, how to tell pxeboot to use the serial console was more easy. A look into /boot/default/loader.conf told me simply to set console="comconsole" within the loader.conf.
Works fine. Now I can enable my FreeBSD users to reinstall their machines on their own the same way they do it at home.