Subject: Re: kernel and root on different filesystems?
To: Gert Doering <gert@greenie.muc.de>
From: Tobias Nygren <tnn@NetBSD.org>
List: port-sparc64
Date: 07/29/2007 14:18:47
On Sun, 29 Jul 2007 11:57:10 +0200
Gert Doering <gert@greenie.muc.de> wrote:

> Hi,
> 
> I'm not sure whether this is really "sparc64" specific, but then, booting
> stuff usually *is* highly platform specific...
> 
> I run NetBSD on an Ultra5, which is handicapped by its very slow IDE
> controller.  So I had the idea to put a faster IDE controller into the
> machine, move all disks to the new controller, and use a CompactFlash
> disk for booting the kernel from the onboard IDE.
> 
> The "easy" way would be to have / on the CompactFlash, and just mount
> /usr etc. from the other IDE disks - but smaller (=cheaper) CF disks
> have issues when overwriting the same sector too often, so one would
> need to play "noatime" etc tricks.
> 
> What I can't seem to figure out is how to tell the system:
> 
>  - boot from "wd0a"  (= "boot disk" in OpenBoot)
>  - mount root file system from "wd1a", load /sbin/init from there, etc.
> 
> I've read all man pages that show up on "man -k boot", but what I'm looking
> for isn't there.
> 
> OK, well, there is a way - set the kernel option
> 
>     config          netbsd  root on wd1a type ffs
> 
> - but that's a compile-time thing, and means "this kernel won't be 
> useful on anything with a different disk setup"...
> 

It would be useful for a different disk setup, with the quirk that
you'd need to pass the -a flag to the boot loader to make the kernel
query about an alternate root filesystem.

A "dirty" trick is to use a raidframe mirror with only one component
(the other one marked "absent") and enable raidframe autoconfiguration.
This might not be such a bad choice if you want to be able to
effortlessly enable raid at some later point.

-Tobias