From owner-freebsd-questions Sun Mar 2 16:26:29 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA14035 for questions-outgoing; Sun, 2 Mar 1997 16:26:29 -0800 (PST) Received: from helbig.informatik.ba-stuttgart.de (helbig.informatik.ba-stuttgart.de [141.31.166.22]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA14021 for ; Sun, 2 Mar 1997 16:26:18 -0800 (PST) Received: (from helbig@localhost) by helbig.informatik.ba-stuttgart.de (8.8.5/8.8.5) id BAA23041; Mon, 3 Mar 1997 01:24:56 +0100 (MET) From: Wolfgang Helbig Message-Id: <199703030024.BAA23041@helbig.informatik.ba-stuttgart.de> Subject: Re: /etc/fstab file screwup. In-Reply-To: from Vincent Poy at "Mar 2, 97 03:36:37 pm" To: vince@mail.MCESTATE.COM (Vincent Poy) Date: Mon, 3 Mar 1997 01:24:54 +0100 (MET) Cc: questions@freebsd.org X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > 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