Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2008 03:19:39 -0700
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        Brian <bri@brianwhalen.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: details on sata issues and mountroot prompt
Message-ID:  <20081011101939.GB58119@icarus.home.lan>
In-Reply-To: <48F03872.7050309@brianwhalen.net>
References:  <48F02B9D.8030300@brianwhalen.net> <48F03872.7050309@brianwhalen.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 10, 2008 at 10:24:02PM -0700, Brian wrote:
> Brian wrote:
>> I have previously written about a mountroot prompt, here are some details.
>> I have a system with an asus m3a78-emh hdmi board, a 74 gig raptor  
>> drive, and a dual core amd am2 cpu.  I have had this result with both  
>> the amd64 and i386 systems.  My steps were all conducted today as 
>> follows.
>>
>> install 7.0 release
>> run freebsd-update
>> get src tree
>> build world
>> build and install kernel
>> reboot and be greeted by a mountroot prompt.
>>
>> It appears the drive numbering changed.  /etc/fstab has the drive  
>> partitions with the number 5, the subsequent reboot got me a number 8.
>>
>> This is a test system not doing anything, so I can kick it any which 
>> way to test stuff.
>>
>> Brian Whalen
>
> I see that I could probably address it with something like this.
>
> ed /etc/fstab
> 1,$s/ad5/ad8/
> w
> q

I see.  So the problem really isn't that your machine locks up or
crashes at the mountroot prompt, it's that the SATA drive IDs changed
between 7.0-RELEASE and 7.1-PRERELEASE.

This is probably because support for some piece of your system was added
to FreeBSD, and now the SATA interface refers to the drives in a
different order.  Possibly your board has support for AHCI which did not
work with older FreeBSD 7.0 but now does with 7.1.

I see it when doing things like enabling "Compatible" mode in the BIOS
for SATA chips, or when toggling between AHCI and SATA Enhanced mode.
I've also seen it when adding an ATA/SATA controller to the system (I
just dealt with this on my home FreeBSD box not more than 2 weeks ago).

You just type in the new root slice **once**, mount all the filesystems
by hand (/usr, /var, etc.) so that you can get vi working (or use ed(1)
as you stated), make the changes to /etc/fstab, and reboot.

I forget how exactly FreeBSD determines what the root disk/slice is,
so whenever I deal with this, I run "bsdlabel -B" on the disk slice,
e.g. "bsdlabel -B ad8s1".  Do NOT run it on the disk ("ad8") unless
you are using dangerously dedicated mode (please don't).

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081011101939.GB58119>