Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2000 09:49:09 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Tim Cox <Tim.Cox@jacobs.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Blown FSTAB
Message-ID:  <20000314094909.A36475@hades.hell.gr>
In-Reply-To: <F74DB26C793FD311893800508B2E0AD64BFDFE@oaknccnt01.jacobs.com>; from Tim.Cox@jacobs.com on Mon, Mar 13, 2000 at 11:06:02AM -0500
References:  <F74DB26C793FD311893800508B2E0AD64BFDFE@oaknccnt01.jacobs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 13, 2000 at 11:06:02AM -0500, Cox, Tim wrote:
> 
> While in the process of loading quotas into the fstab, I incorrectly
> typed in "rw,quotauser" into the /etc/fstab. Now my system, will not
> boot. Any ideas? I can CAT and CP the /etc/fstab file but VI will not
> work.

Assuming that you are running FreeBSD (which I can not make for sure
from your message), you can always boot single user and correct the
files you need to change.

  1. Reboot the system and at the boot loader prompt, press ESC instead
     of the usual RETURN when you're prompted for a key.

  2. Type 'boot -s' without the quotes to boot single-user.

  3. When the system loads it's kernel and boots, it will only load a
     /bin/sh to let you do your work.

  4. Run the usual /bin/sh initialization scripts of root, because the
     single-user shell does not run them automagically (it's not a login
     shell, it's not supposed to run them):

	# export HOME=/root
	# cd
	# . .profile

  5. Step 4 must have fixed your PATH and other important environment
     vars, let's move on to the real work.

  6. Mount all disks that the old fstab was SUPPOSED to mount, manually.
     This might involve a few `cat /etc/fstab' commands, to let you see
     the actual device names and mount points.  Be sure to mount as
     read-write at least your / and /usr filesystems.

     Example:

	( remount root filesystem as read-write )
	# mount -o rw -u /dev/ad0s1a /
	( mount /usr as read-write )
	# mount -t ufs /dev/ad0s2a /usr

Now, you are ready to use vi(1) or any other editor you prefer to edit
/etc/fstab to your will.

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public PGP key: finger keramida@diogenis.ceid.upatras.gr
PGP fingerprint, phone and address in the headers of this message.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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