Subject: Re: @booted_kernel magic symlink?
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 04/28/2006 04:27:56
> /kern/r?rootdev aren't really that useful. they don't work if the
> root device node isn't in the (vnode?) cache.
Odd. I never noticed that. I'll have to look at it and see if I can
fix it.
> ie, you can't use it for "mount /kern/rootdev /" because the kernel
> doesn't know what rootdev is (from the /dev device POV) until the
> real device node is accessed..
But you don't need to know *which* real device node that is.
"ls -l /dev > /dev/null" is all it takes, at least in a small test I
just did. Then you can "mount /kern/rootdev /" just fine, without
needing to know which of the devices in /dev it actually is. (You can
tell, of course, by comparing the major/minor numbers for /kern/rootdev
to the stuff in /dev, but that's a pain.)
Of course, this doesn't help the case where your rootdev isn't present
in /dev (whether because you booted from somewhere unusual or because
/dev is not fully populated), which is when you need it most. I'll
definitely have to look at fixing it.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B