From owner-freebsd-questions Thu Sep 7 18:40:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail-2.sjc.telocity.net (mail-2.sjc.telocity.net [216.227.56.42]) by hub.freebsd.org (Postfix) with ESMTP id 6657337B424 for ; Thu, 7 Sep 2000 18:40:06 -0700 (PDT) Received: from zoso (dsl-216-227-91-85.telocity.com [216.227.91.85]) by mail-2.sjc.telocity.net (8.9.3/8.9.3) with SMTP id SAA26141; Thu, 7 Sep 2000 18:34:33 -0700 (PDT) From: "Otter" To: "Tomlinson, Drew" , "'FreeBSD Questions (E-mail)'" Subject: RE: How to Edit FSTAB When / is Read-Only Date: Thu, 7 Sep 2000 21:42:04 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0019_01C01914.76CED280" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <8C224DC088D8D111B67D0000F67AC17E029C4AA4@ldcmsx01.lc.ca.gov> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 How to Edit FSTAB When / is Read-Only
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.
-Otter
 
-----Original Message-----
From:=20 owner-freebsd-questions@FreeBSD.ORG=20 [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of = Tomlinson,=20 Drew
Sent: Thursday, September 07, 2000 7:48 = PM
To:=20 'FreeBSD Questions (E-mail)'
Subject: How to Edit FSTAB When = / is=20 Read-Only

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

I am running release 4.0 on a 486-DX = with a 850 MB=20 IDE drive.  I have since added a 6 GB IDE drive.  I used=20 /stand/sysinstall to both FDISK and Label the drive.  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.

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

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.  After the errors, I'm left with a # = prompt at=20 the console.  I assume this is the sh shell.  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.  Because the = file=20 system isn't mounted, the vi editor is not available.  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.  What can I do to fix this=20 problem?

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

Thanks in advance for your=20 assistance!

Drew =

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