Fw: Re: Disk partitions cannot be found/mounted after swappi

Duncan Barclay dmlb at dmlb.org
Wed Oct 16 16:16:05 BST 2002


On 16-Oct-2002 David Marsh wrote:
> On Tue, 15 Oct 2002 21:37:44 +0100 (BST)
> Duncan Barclay <dmlb at dmlb.org> wrote:
> 
> 
>> Nope, just boot into single user mode on the machine with the
>> problems. When you see the "booting /kernel in 10seconds", press the
>> space bar, and type boot -s.
> 
> Ah, right.
> 
> I've tried this, but unfortunately the booting process still stops
> (without an error message of any kind) at the point where it tries to
> mount the root device (even though it has been merrily booting the
> kernel from it up until then). Bizarrely I can reboot the system with
> <ctrl>-<alt>-<del> and it does shut down cleanly (appropriate shutdown
> messages, etc)..
> 
> So it looks like I can't get to the stage where I can even type any of
> your script.. :-(
> 
> [script snipped: thanks for the explanation, I see what it is doing,
> now]
> 
>  
>> what does
>>         ls -l /dev/ad0*
>> report?
> 
> Well right now, I can only seem to boot from the boot floppies..
> 
> Doing so and then mounting /dev/ad0s2 (ie, the root partition) gives:
> (ie, the /dev entries in ad0s2)
> 
> crw-r----- 2 root 5 116,   0 May  5  2001 ad0a
> crw-r----- 2 root 5 116,   1 May  5  2001 ad0b
> crw-r----- 2 root 5 116,   2 May  5  2001 ad0c
> crw-r----- 2 root 5 116,   3 May  5  2001 ad0d
> crw-r----- 2 root 5 116,   4 May  5  2001 ad0e
> crw-r----- 2 root 5 116,   5 May  5  2001 ad0f
> crw-r----- 2 root 5 116,   6 May  5  2001 ad0g
> crw-r----- 2 root 5 116,   7 May  5  2001 ad0h
> crw-r----- 2 root 5 116, 0x00020000 Feb 5 2001 ad0s1a
> crw-r----- 2 root 5 116, 0x00020001 Feb 5 2001 ad0s1b
> crw-r----- 2 root 5 116, 0x00020002 Feb 5 2001 ad0s1c
> crw-r----- 2 root 5 116, 0x00020003 Feb 5 2001 ad0s1d
> crw-r----- 2 root 5 116, 0x00020004 Feb 5 2001 ad0s1e
> crw-r----- 2 root 5 116, 0x00020005 Feb 5 2001 ad0s1f
> crw-r----- 2 root 5 116, 0x00020006 Feb 5 2001 ad0s1g
> crw-r----- 2 root 5 116, 0x00020007 Feb 5 2001 ad0s1h
> crw-r----- 2 root 5 116, 0x00030000 May 5 2001 ad0s2a
> crw-r----- 2 root 5 116, 0x00030001 May 5 2001 ad0s2b
> crw-r----- 2 root 5 116, 0x00030002 May 5 2001 ad0s2c
> crw-r----- 2 root 5 116, 0x00030003 May 5 2001 ad0s2d
> crw-r----- 2 root 5 116, 0x00030004 May 5 2001 ad0s2e
> crw-r----- 2 root 5 116, 0x00030005 May 5 2001 ad0s2f
> crw-r----- 2 root 5 116, 0x00030006 May 5 2001 ad0s2g
> crw-r----- 2 root 5 116, 0x00030007 May 5 2001 ad0s2h
> 
> [whew, nasty bit of retyping and selective editing there ;-)]
> 
> It beats me why I can manipulate this partition when mounting it via the
> boot floppies, but why the system now seemingly can't see it at all when
> trying to boot normally (yet it loads in the kernel from it just
> fine..).
> 
> David.

Okay, what is probably happening is that the kernel expects its root
to be on /dev/ad0s1a or something via a compiled in default. Have a
look at /sys/i386/conf/LINT and read around the line
        options         ROOTDEVNAME=\"ufs:da0s2e\"
To get round this you need to tell the kernel that you want it
to boot from somewhere else.

Again at the loader prompt:
        boot -sa
The -a tells the kernel to ask you for a rott partition once all the
device probes are finished. At the prompt type
        ufs:ad0s2a
or
        ufs:/dev/ad0s2a

I needed to do this on Monday and somehow the kernel rememered it after the
first go. If it doesn't you can add magic to /boot/<something>.conf
or just recompile a kernel with a new ROOTDEVNAME in it.

Duncan


-- 
________________________________________________________________________
Duncan Barclay  | God smiles upon the little children,
dmlb at dmlb.org   | the alcoholics, and the permanently stoned.
dmlb at freebsd.org| Steven King




More information about the Ukfreebsd mailing list