Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2000 21:42:04 -0400
From:      "Otter" <otterr@telocity.com>
To:        "Tomlinson, Drew" <Drew.Tomlinson@lc.ca.gov>, "'FreeBSD Questions (E-mail)'" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: How to Edit FSTAB When / is Read-Only
Message-ID:  <HLEDJBJKDDPDJBMGCLPPKEDLCCAA.otterr@telocity.com>
In-Reply-To: <8C224DC088D8D111B67D0000F67AC17E029C4AA4@ldcmsx01.lc.ca.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C01914.76CED280
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

How to Edit FSTAB When / is Read-OnlyTry issuing a "mount / " command. When
it gives you the prompt for location of /bin/sh, and dumps you to a ro
filesystem, mounting it manually should make it rw for you.
-Otter

  -----Original Message-----
  From: owner-freebsd-questions@FreeBSD.ORG
[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Tomlinson, Drew
  Sent: Thursday, September 07, 2000 7:48 PM
  To: 'FreeBSD Questions (E-mail)'
  Subject: How to Edit FSTAB When / is Read-Only


  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


------=_NextPart_000_0019_01C01914.76CED280
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>How to Edit FSTAB When / is Read-Only</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D859013701-08092000><FONT face=3DArial color=3D#0000ff =
size=3D2>Try=20
issuing a "mount / " command. When it gives you the prompt for location =
of=20
/bin/sh, and dumps you to a ro filesystem, mounting it manually should =
make it=20
rw for you.</FONT></SPAN></DIV>
<DIV><SPAN class=3D859013701-08092000><FONT face=3DArial color=3D#0000ff =

size=3D2>-Otter</FONT></SPAN></DIV>
<DIV><SPAN class=3D859013701-08092000></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  owner-freebsd-questions@FreeBSD.ORG=20
  [mailto:owner-freebsd-questions@FreeBSD.ORG]<B>On Behalf Of =
</B>Tomlinson,=20
  Drew<BR><B>Sent:</B> Thursday, September 07, 2000 7:48 =
PM<BR><B>To:</B>=20
  'FreeBSD Questions (E-mail)'<BR><B>Subject:</B> How to Edit FSTAB When =
/ is=20
  Read-Only<BR><BR></FONT></DIV>
  <P><FONT face=3DArial size=3D2>I am new to both Unix and FreeBSD so I =
apologize if=20
  this question is very elementary.</FONT> </P>
  <P><FONT face=3DArial size=3D2>I am running release 4.0 on a 486-DX =
with a 850 MB=20
  IDE drive.&nbsp; I have since added a 6 GB IDE drive.&nbsp; I used=20
  /stand/sysinstall to both FDISK and Label the drive.&nbsp; Both drives =
in this=20
  system were FDISKed with the option to use all space for FBSD and not =
be=20
  compatible with other file systems.</FONT></P>
  <P><FONT face=3DArial size=3D2>Next, I added the drives to /etc/fstab =
and then=20
  issued a mount -a.&nbsp; At this point my system quit responding, even =
from=20
  the console port.&nbsp; Every command I entered was invalid.&nbsp; =
Even simple=20
  commands like ls, pwd, cd, etc. no longer were valid.&nbsp; I had no =
choice=20
  other than to power off/on the machine.</FONT></P>
  <P><FONT face=3DArial size=3D2>Upon reboot, there were many errors =
that scrolled=20
  by before I could capture them but they were all related to the new =
drive that=20
  I attempted to install.&nbsp; After the errors, I'm left with a # =
prompt at=20
  the console.&nbsp; I assume this is the sh shell.&nbsp; I believe if I =
can=20
  edit or change my /etc/fstab file, my problems will be gone and the =
system=20
  won't have mounting problems and will boot normally.&nbsp; Because the =
file=20
  system isn't mounted, the vi editor is not available.&nbsp; I do have =
a backup=20
  of the fstab but when I attempt to copy it, I get an error because the =
/=20
  filesystem is mounted read-only.&nbsp; What can I do to fix this=20
  problem?</FONT></P>
  <P><FONT face=3DArial size=3D2>Here is the content of my =
/etc/fstab:</FONT>=20
  <BR><FONT face=3DArial size=3D2>#</FONT><FONT face=3D"Courier New" =
size=3D2>=20
  =
Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
  Mountpoint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FStype&nbsp;=20
  Options&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Dump&nbsp;&nbsp;&nbsp;=20
  Pass#</FONT> <BR><FONT face=3D"Courier New"=20
  =
size=3D2>/dev/ad0s1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

  swap&nbsp;&nbsp;&nbsp;=20
  =
sw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>/dev/ad0s1a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  =
/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
  ufs&nbsp;&nbsp;&nbsp;&nbsp;=20
  =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>/dev/ad0s1f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  /usr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

  ufs&nbsp;&nbsp;&nbsp;&nbsp;=20
  =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>/dev/ad0s1e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  /var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

  ufs&nbsp;&nbsp;&nbsp;&nbsp;=20
  =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>/dev/acd0c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
  /cdrom&nbsp; cd9660&nbsp; =
ro,noauto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>/dev/ad2s1b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  none&nbs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sp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
  /var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

  ufs&nbsp;&nbsp;&nbsp;&nbsp;=20
  =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT> <BR><FONT =
face=3D"Courier New"=20
  =
size=3D2>proc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  /proc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
procfs&nbsp;=20
  =
rw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
  0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT> <BR><FONT =
face=3D"Courier New"=20
  size=3D2>192.168.0.254:/My_Webs /usr/local/www/data&nbsp;&nbsp;=20
  nfs&nbsp;&nbsp;&nbsp;&nbsp; ro,union&nbsp;&nbsp;=20
  0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</FONT> </P>
  <P><FONT face=3D"Courier New" size=3D2>Thanks in advance for your=20
  assistance!</FONT> </P>
  <P><FONT face=3D"Courier New" size=3D2>Drew</FONT> =
</P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0019_01C01914.76CED280--



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?HLEDJBJKDDPDJBMGCLPPKEDLCCAA.otterr>