Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Aug 2004 16:49:03 +1000
From:      Joel Hatton <joel@auscert.org.au>
To:        freebsd-stable@freebsd.org
Subject:   How to successfully mount /root if not in fstab?
Message-ID:  <200408020649.i726n3iP025630@app.auscert.org.au>

next in thread | raw e-mail | index | archive | help
Hi,

I've been caught out (twice now - yes, I was stupid enough to do this
twice!) with mounting /root after removing a hard disk from my system and
would like to know why it wasn't trivial to recover. I had FreeBSD 4.10
installed on ad1, with ad0 hosting the boot manager and ad1 containing an
msdos boot sector; I removed ad0 from the system and forgot to edit
/etc/fstab before rebooting. With ad1 now ad0, the system booted the kernel
ok, but /root couldn't be found (of course) - at this point all was as
expected. However, when prompted for a mount command, I don't know why
"ufs:/dev/ad0s1a" didn't work - error 6 and the prompt was redisplayed.

To recover, I booted from a fixit CD, mounted /root and edited fstab to
reflect the new arrangement and all was well. However, I discovered another
anomaly while doing this - when I entered the fixit shell I first tried
"fsck -y /dev/ad0s1a" but it returned an error about /etc/fstab. I was
able to "mount -o rw /dev/ad0s1a /mydir", however. Why?

Sorry for the lack of detail, but I'll bet both of these things have been
encountered by many others before...

cheers,
-- Joel Hatton --
Security Analyst                    | Hotline: +61 7 3365 4417
AusCERT - Australia's national CERT | Fax:     +61 7 3365 7031
The University of Queensland        | WWW:     www.auscert.org.au
Qld 4072 Australia                  | Email:   auscert@auscert.org.au



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