Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to successfully mount /root if not in fstab?

7 views
Skip to first unread message

jo...@auscert.org.au

unread,
Aug 2, 2004, 2:49:23 AM8/2/04
to
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: aus...@auscert.org.au
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"

csw...@mac.com

unread,
Aug 2, 2004, 1:05:37 PM8/2/04
to
On Aug 2, 2004, at 2:49 AM, Joel Hatton wrote:
> 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.

The system requires a working root account in order to be repairable in
single-user mode. One consequence of this is that /root needs to be on
the same partition as /, for much the same reasons that /bin or /etc
needs to be on /.

--
-Chuck

0 new messages