Installing FreeBSD via serial console and PXE

— by Jeremy Chadwick <>

Choose one:

  1. Installing FreeBSD 7.x via serial console and PXE
  2. Installing FreeBSD 8.x via serial console and PXE

An author's preface...

Before I get started, I want to take a moment to remind readers of an obvious fact which, apparently, some have forgotten:

The year is 2010, not 1989.

FreeBSD was originally considered the "die-hard server operating system", which means it was intended for servers. It was used as such back when the 2.2.x series was available. Datacenters today are usually massive (read: have a very large number of servers), and require the need of 3 simple things, all of which are well-established and common:

  1. Installation of an entire OS without physical access to the box
  2. Heavy reliance on the network for installation (e.g. network install)
  3. Use of high speed serial console (9600+bps) from start to finish to assist or automate said installation.

For sake of comparison, both Linux and Solaris (sparc and i386) have the above needs addressed, but FreeBSD trails behind. Accomplishing the above on FreeBSD requires the knowledge which I think many administrators lack — and that's not their fault. Things like:

  1. Intricate knowledge of how the FreeBSD multi-stage (boot0/boot1/boot2/loader) bootstrap behaves, and what pxeboot(8) really is
  2. Rebuilding above bootstraps with custom options during compile
  3. Implementation of said bootstraps into PXE-based installation environments
  4. Knowledge of how TFTP and DHCP work, and how to debug them if they break,
  5. Familiarity with NFS (configuration and security awareness), and any one-off quirks that pertain to a specific FreeBSD release/version
  6. Familiarity with tftpd (specifically permissions quirks it has in its code
  7. Intricate knowledge of configuring a DHCP server (common question: "what's the 'next-server' and 'option root-path' stuff? Is it needed? Why?")
  8. Disk label/GEOM changes (particular to 8.x)
  9. Caveats/bugs with all of the above, and more. Examples: how out-of-the-box FreeBSD sets the maximum serial port speed to 9600bps, not being able to do a complete 100% TFTP-based (e.g. no NFS) install, security issues surrounding use of rpcbind/mountd/nfsd (daemons binding to INADDR_ANY despite use of -h, using arbitrary port numbers which make it difficult to firewall off, etc.), undocumented pxeboot(8) options which are more or less and many other things.

If you're not "acceptably" familiar with all of the above, you'll end up smashing your head against your monitor for days before posting to a mailing list — only to hear leaves rustle, or possibly someone saying "me too!" Most administrators do not know how to program, and even if they did (like myself), lack knowledge of the inner-workings of the above. Therefore, we can't realistically expect administrators of systems to provide patches or enhancements to make this process easier (for sake of comparison, it took me 7 hours just to get it all up and working) — we can only expect them to report the problems and hope someone more technical steps up to the plate.

With the introduction of FreeBSD 8.x into the fray, things became more irritating. The procedure for 8.x is more or less the same as 7.x, except there are numerous things which will catch you off-guard. For example, I received a couple of reports from other administrators following my 7.x guide for 8.x, but were running into issues. It wasn't until I tried it myself on 8.x that I was able to share their pain, thus working out the quirks.

Rant over.

I hope the above documents help anyone/everyone who is looking to do a remote installation of present-day FreeBSD via PXE using serial console rather than over VGA.

当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
若有不妥, 欢迎评注提醒:


订阅 substack 体验古早写作:

点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:


关于 ~ DebugUself with DAMA ;-)
公安备案号: 44049002000656 ...::