From owner-freebsd-stable@FreeBSD.ORG Mon Aug 2 06:49:06 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD11216A4CE for ; Mon, 2 Aug 2004 06:49:06 +0000 (GMT) Received: from titania.auscert.org.au (gw.auscert.org.au [203.5.112.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1DAF43D1D for ; Mon, 2 Aug 2004 06:49:05 +0000 (GMT) (envelope-from joel@auscert.org.au) Received: from app.auscert.org.au (app [10.0.1.192])i726m4TN070348 for ; Mon, 2 Aug 2004 16:48:04 +1000 (EST) Received: from app.auscert.org.au (localhost [127.0.0.1]) by app.auscert.org.au (8.12.10/8.12.10) with ESMTP id i726n3iP025630; Mon, 2 Aug 2004 16:49:03 +1000 (EST) Message-Id: <200408020649.i726n3iP025630@app.auscert.org.au> To: freebsd-stable@freebsd.org Date: Mon, 02 Aug 2004 16:49:03 +1000 From: Joel Hatton Subject: How to successfully mount /root if not in fstab? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2004 06:49:07 -0000 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