Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2002 17:30:25 +0200 (MET DST)
From:      Adriaan de Groot <adridg@cs.kun.nl>
To:        freebsd-questions@freebsd.org
Subject:   Loading an mfs_root image from HDD
Message-ID:  <Pine.GSO.4.44.0206051702270.6303-100000@odin.cs.kun.nl>

next in thread | raw e-mail | index | archive | help
[Synopsis: how do you load a kernel *and* an mfs_root image from a hard
disk and get it to boot? load /kernel ; load -t mfs_root /mfsroot when
both are on the HDD doesn't work for me.]

For whatever reasons, I'd like to spin down the HDD in one of my systems
shortly after boot and keep it that way. Using MFS seems like a sensible
approach. Regular diskless operation isn't an option here, because there's
no NFS server that could serve out the root FS for me.

Something I've tried and that works reasonably well is to just boot off
the HDD and in rc.local make an MFS copy of all the top-level directories
(/usr, /var, /tmp, ...). That leaves me with: /dev/ad0s1a mounted on / and
a bunch of MFS mounted on the top-level directories. Since almost nothing
changes things in / (like the mtime of top-level directories, or adding
files there), the HDD spins down after a while and things are OK.

All this is with a stripped-down install of 4.5-RELEASE and with enough
memory to hold all that in memory.

What I'd *like* to do, and what seems most natural, is just make an MFS
image -- one single image including the root -- and stick that on the HDD.
At boot, load the kernel from the HDD, and the MFS image, and make that
root. Just like the kern.flp boot process, which loads the MFS image from
the mfsroot.flp. This doesn't work for me with a GENERIC kernel, nor with
the kernel off the kern.flp either. I end up at the mountboot> prompt,
where ufs:/dev/md0 fails, ufs:mem panics, and ufs:/dev/ad0s1a boots
normally off the hard disk. Hmph.

What's the required magic here? Is the trick to jack up options
MD_ROOT_SIZE=10 to the correct (enormous) number to accomodate this large
MD?




-- 
+------------------------------+--------------------------------------------+
+ Adriaan de Groot             + Project: FRESCoS                           +
+ adridg@cs.kun.nl             + Private: adridg@sci.kun.nl                 +
+ Kamer A6020 tel. 024 3652272 + http://www.cs.kun.nl/~adridg/frescos/      +



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.44.0206051702270.6303-100000>