Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Sep 2000 16:47:57 -0700
From:      "Tomlinson, Drew" <Drew.Tomlinson@lc.ca.gov>
To:        "'FreeBSD Questions (E-mail)'" <freebsd-questions@FreeBSD.org>
Subject:   How to Edit FSTAB When / is Read-Only
Message-ID:  <8C224DC088D8D111B67D0000F67AC17E029C4AA4@ldcmsx01.lc.ca.gov>

next in thread | raw e-mail | index | archive | help
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--Boundary_(ID_FLaFtjMTHw8VchmK0SMpeg)
Content-type: text/plain; charset="iso-8859-1"

I am new to both Unix and FreeBSD so I apologize if this question is very
elementary.

I am running release 4.0 on a 486-DX with a 850 MB IDE drive.  I have since
added a 6 GB IDE drive.  I used /stand/sysinstall to both FDISK and Label
the drive.  Both drives in this system were FDISKed with the option to use
all space for FBSD and not be compatible with other file systems.

Next, I added the drives to /etc/fstab and then issued a mount -a.  At this
point my system quit responding, even from the console port.  Every command
I entered was invalid.  Even simple commands like ls, pwd, cd, etc. no
longer were valid.  I had no choice other than to power off/on the machine.

Upon reboot, there were many errors that scrolled by before I could capture
them but they were all related to the new drive that I attempted to install.
After the errors, I'm left with a # prompt at the console.  I assume this is
the sh shell.  I believe if I can edit or change my /etc/fstab file, my
problems will be gone and the system won't have mounting problems and will
boot normally.  Because the file system isn't mounted, the vi editor is not
available.  I do have a backup of the fstab but when I attempt to copy it, I
get an error because the / filesystem is mounted read-only.  What can I do
to fix this problem?

Here is the content of my /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump
Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s1f             /usr            ufs     rw              2       2
/dev/ad0s1e             /var            ufs     rw              2       2
/dev/acd0c              /cdrom  cd9660  ro,noauto       0       0
/dev/ad2s1b             none            swap    sw              0       0
/dev/ad2s1a             /               ufs     rw              1       1
/dev/ad2s1f             /usr            ufs     rw              2       2
/dev/ad2s1e             /var            ufs     rw              2       2
proc                    /proc           procfs  rw              0       0
192.168.0.254:/My_Webs /usr/local/www/data   nfs     ro,union   0       0

Thanks in advance for your assistance!

Drew


--Boundary_(ID_FLaFtjMTHw8VchmK0SMpeg)
Content-type: text/html; charset="iso-8859-1"
Content-transfer-encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>How to Edit FSTAB When / is Read-Only</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am new to both Unix and FreeBSD so I =
apologize if this question is very elementary.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am running release 4.0 on a 486-DX =
with a 850 MB IDE drive.&nbsp; I have since added a 6 GB IDE =
drive.&nbsp; I used /stand/sysinstall to both FDISK and Label the =
drive.&nbsp; Both drives in this system were FDISKed with the option to =
use all space for FBSD and not be compatible with other file =
systems.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Next, I added the drives to /etc/fstab =
and then issued a mount -a.&nbsp; At this point my system quit =
responding, even from the console port.&nbsp; Every command I entered =
was invalid.&nbsp; Even simple commands like ls, pwd, cd, etc. no =
longer were valid.&nbsp; I had no choice other than to power off/on the =
machine.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Upon reboot, there were many errors =
that scrolled by before I could capture them but they were all related =
to the new drive that I attempted to install.&nbsp; After the errors, =
I'm left with a # prompt at the console.&nbsp; I assume this is the sh =
shell.&nbsp; I believe if I can edit or change my /etc/fstab file, my =
problems will be gone and the system won't have mounting problems and =
will boot normally.&nbsp; Because the file system isn't mounted, the vi =
editor is not available.&nbsp; I do have a backup of the fstab but when =
I attempt to copy it, I get an error because the / filesystem is =
mounted read-only.&nbsp; What can I do to fix this problem?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Here is the content of my =
/etc/fstab:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">#</FONT><FONT SIZE=3D2 =
FACE=3D"Courier New"> =
Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; Mountpoint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
FStype&nbsp; Options&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Dump&nbsp;&nbsp;&nbsp; Pass#</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">/dev/ad0s1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; =
none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
swap&nbsp;&nbsp;&nbsp; =
sw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">/dev/ad0s1a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; =
/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; ufs&nbsp;&nbsp;&nbsp;&nbsp; =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; =
/var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ufs&nbsp;&nbsp;&nbsp;&nbsp; =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">proc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
/proc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
procfs&nbsp; =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">192.168.0.254:/My_Webs =
/usr/local/www/data&nbsp;&nbsp; nfs&nbsp;&nbsp;&nbsp;&nbsp; =
ro,union&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Thanks in advance for your =
assistance!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Drew</FONT>
</P>

</BODY>
</HTML>

--Boundary_(ID_FLaFtjMTHw8VchmK0SMpeg)--


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?8C224DC088D8D111B67D0000F67AC17E029C4AA4>