Documentation: Installing FreeBSD 7.0 via serial console and PXE

Jeremy Chadwick koitsu at
Tue Jan 29 12:06:19 PST 2008

On Tue, Jan 29, 2008 at 02:50:43PM -0500, Ed Maste wrote:
> > iv.  Knowledge of how TFTP and DHCP work, and how to debug them if
> >      they break,
> > v.   Intricate knowledge of configuring a DHCP server (common
> >      question: "what's the 'next-server' and 'option root-path'
> >      stuff? Is it needed? Why?")
> I admit that I haven't tried installing Linux or Solaris via PXE, but I
> find it interesting that such knowledge wouldn't be required for them.

It's much more "solid" in the sense that with Linux, you simply tell the
boot loader (GRUB or whatever else) to pass the kernel an argument that
says "use this serial port speed, no VGA console, and output everything
to this serial port".  That's *it*.

I'd have to dig a little deeper on Solaris i386 (I'm pretty sure it's a
boot loader option, similar to -S115200 in /boot.config on FreeBSD), but
on Sparc I believe OpenBoot takes care of this pain for you.

> > vii. ... not being able to do a complete 100% TFTP-based (e.g. no
> >      NFS) install
> Well, you _can_ do a complete 100% TFTP-based install, but the loader
> has to be compiled with an option.  I agree that is rather unfortunate.

I believe the options you're referring to are LOADER_TFTP_SUPPORT and
LOADER_NFS_SUPPORT.  Even if you define LOADER_NFS_SUPPORT=no, loader(8)
will still resort to using NFS.  I've confirmed this on a couple
occasions by defining PXE_DEBUG=1 and looking at the output.  NFS, from
what I can tell, is needed regardless because TFTP offers no way (AFAIK)
of handling directory structures.  This is speculation on my part, but
the confirmation that there's no way to do a pure TFTP-based install has
been verified.

PR kern/74352 confirms this as well.

> > If you tell boot2 to set the speed to 115200 (e.g.
> > comconsole_speed="115200"), it won't work ? you'll still get 9600bps.
> Sure, since boot2 doesn't look at loader.conf.  You're right, if you
> have a hard disk putting -S115200 in /boot.config is the best bet, and
> the loader will pick the speed setting up automatically.

Which begs the question -- why is there some kind of association between
the maximum speed a serial port can be set to and the speed the port
*is* set to currently?  I don't mind if FreeBSD defaults to 9600bps out
of the box, but I *do* mind that I can't set that serial port's speed
higher than 9600bps anywhere (including getty, stty, etc.) unless the
boot blocks are rebuilt.

> > But when PXE booting, there's only one piece of the bootstrap used:
> > pxeboot(8). This means the only solution is to rebuild the boot
> > blocks with a serial port speed that has the speed you want -- in this
> > case, 115200bps. 
> That shouldn't be the case; comconsole_speed="115200" should be
> sufficient to set the speed.  (Granted the port will start out at 9600
> until the conf file gets parsed.)

Nope -- I've confirmed this on every system I've used during the past 12
years I've used FreeBSD.  BOOT_COMCONSOLE_SPEED=9600 (the default) also
sets the *maximum* speed permitted for that serial port to 9600, until
the boot blocks are rebuilt.

> How is the console speed handled when PXE booting other operating
> systems?

On Sparcs, I believe OpenBoot takes care of it for you (you tell it what
speed you want, and it does the work for you).  I'm not sure about other
i386 platforms.

| Jeremy Chadwick                                    jdc at |
| Parodius Networking                  |
| UNIX Systems Administrator                      Mountain View, CA, USA |
| Making life hard for others since 1977.                  PGP: 4BD6C0CB |

More information about the freebsd-stable mailing list