Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 1997 01:24:54 +0100 (MET)
From:      Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
To:        vince@mail.MCESTATE.COM (Vincent Poy)
Cc:        questions@freebsd.org
Subject:   Re: /etc/fstab file screwup.
Message-ID:  <199703030024.BAA23041@helbig.informatik.ba-stuttgart.de>
In-Reply-To: <Pine.BSF.3.95.970302153512.1373D-100000@mail.MCESTATE.COM> from Vincent Poy at "Mar 2, 97 03:36:37 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> > In single user mode the root file system will be mounted read only.
> > The /etc/fstab lives in the root file system so you have to mount it
> > for r/w access.
> > You do it by
> > 	# mount -o rw -u /
> > 
> > Then you can edit /etc/fstab with the  ed  editor. If you feel uncomfortable
> > with  ed you can mount the /usr file system and use vi.
> > 
> > wishing you success
> 
> 	Thanks but the problem with vi is it's in /usr/bin,  our fstab is
> wrong for both /usr and the swap partition, how do we find out what the
> correct device is first?  

I do not know where your devices are, but I will send you my /etc/fstab, so
you might guess your entries. 

I have to IDE disks, each master on primary res. secondary IDE-channel.
The first disk (wd0) has one slice (wd0s1) ( = one "DOS Partition") and
this slice has the "usual" BSD partitions. Swap is always partion b.
Partition f (wd0s1f) is not used in fstab.

The second disk (wd2) --master on the second IDE channel-- has one
slice (wd2s1) and this slice has one partition (wd2s1a).

So my fstab looks like this:

/dev/wd0s1b			none		swap	sw 0 0
/dev/wd0a			/		ufs	rw 1 1
#/dev/wd0s1f			/usr		ufs	rw 1 1
/dev/wd0s1e			/var		ufs	rw 1 1
/dev/wd2a			/usr		ufs	rw 1 1
proc				/proc		procfs	rw 0 0
/dev/wcd0c			/cdrom		cd9660	ro,noauto 0 0

To get vi, I would have to enter
	# mount  /dev/wd2a /usr

OTOH, it is not to hard to learn some ed commands. You could even
try to enter you fstab with 

	# cat > /etc/fstab
	/dev/wd0s1b	none	swap	sw 0 0
	 ...
	^D
	#
  
 good luck
 Wolfgang



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