From owner-freebsd-questions Fri Jun 7 8:30:54 2002 Delivered-To: freebsd-questions@freebsd.org Received: from pandora.cs.kun.nl (pandora.cs.kun.nl [131.174.33.4]) by hub.freebsd.org (Postfix) with ESMTP id 916F837B427 for ; Fri, 7 Jun 2002 08:30:27 -0700 (PDT) Received: from odin.cs.kun.nl by pandora.cs.kun.nl via odin.cs.kun.nl [131.174.33.33] with ESMTP for id g57FUQC14610 (8.11.3/3.19); Fri, 7 Jun 2002 17:30:26 +0200 (MET DST) Date: Fri, 7 Jun 2002 17:30:25 +0200 (MET DST) From: Adriaan de Groot Reply-To: adridg@cs.kun.nl To: freebsd-questions@freebsd.org Subject: Loading an mfs_root image from HDD Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [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