On Wed, 21 Jul 2004, Adriel T. Desautels wrote:
> Hey guys,
> I am trying to do a PXE boot using TFTP on a Soekris system. When
> the system boots it tells me that R/W mount of /mnt is denied. Filesystem is
> not clean - run fsck. Then it presents me with a mountroot option. What is
> this? Why is it not booting off of PXE. I changed the bios on the remote
> (tftp server) to be CHS and not LBA. Whats the ditty?
The FreeBSD kernel has no means to use TFTP as the root filesystem. If
you read the loader.rc for m0n0wall, you'll see that it has the bootloader
not only load the kernel, but also load the (compressed) mfsroot as a
module, so that the kernel can find it. The easiest way to netboot is to
do the same thing. If you have pxeboot working well enough to load the
kernel, you should be able to load the mfsroot as well. If not, see below
reagrding "loader level".
Here I have netbooting set up so that it loads the kernel and mfsroot, but
then stops without autobooting, so that I have the option to load
something else. Unfortunately, the loader doesn't allow keyboard
interruption until it's done loading both (it also allows keyboard
interruption at a *very* early stage, but that's before it's loaded its
own additional pieces).
Once you get past the rootfs problem, you'll find that m0n0wall falls on
its face if it can't find a config file (which must be local, not TFTP or
NFS). If you have a valid m0n0wall CF in place this shouldn't be a
problem, but it's an obstacle to getting up with a new or corrupted CF.
You don't say whether you have the complete loader working or just the
"abbreviated version". Getting the former requires that the loader load
additional files of its own, which are referenced via absolute paths and
thus not TFTP-accessible (since the TFTP mode ignores the rootpath
option). I thought about fixing this, but decided it was easier just to
use NFS instead, even though NFS itself is harder to set up than TFTP.
BTW, for some weird reason, the netbooted kernel winds up with the LAN
interface in 10half mode, probably due to an autonegotiation failure.
This is with the exact same kernel binary that works properly when loaded
from CF. And both the BIOS and the loader use 100full just fine; only the
kernel screws up. I suspect that some state the interface is left in
after netbooting is poisoning autonegotiation. I'm not sure if the
problem is limited to the LAN interface, since the WAN side is all 10half,