LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2003, 12:17 PM   #1
Vengent
LQ Newbie
 
Registered: May 2003
Posts: 5

Rep: Reputation: 0
Fstab


Info first.

Running RH7.3 with kernel 2.4.18-18.7.x


Did a bonehead thing and screwed with my fstab file and then rebooted.

When it gets to the "checking root filesytem" section on boot it errors out with.

fsck.ext2/:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 fielsystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>

: Is a directory while tryign to open /

Then it asks for password to get a shell or reboots.


I go on in to the shell and I'm at the (Repair filesystem) 1# prompt.

>mount

/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)

But when I try to go to /etc to edit the fstab and put it back how it was, it loads up fine, but when I try to save it says [Cannot open file for writing: Read-only file system ]


So I'm pretty sure I can get the fstab back to how it was if I can figure out how to get the system in RW mode, but from mount it looks like it is.

Rather lost at this point, appreciate any help folks.

Vengent
 
Old 05-08-2003, 12:40 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
It looks as if it is time to bone up on the Rescue Mode proceedure for Redhat 7.3.
 
Old 05-08-2003, 01:08 PM   #3
Vengent
LQ Newbie
 
Registered: May 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Okay, gave that page the once over, loaded up in rescue mode, mount the partition and put my fstab back like it was.

Backed out and rebooted again, now it gets slightly past that to the;

Finding module dependencies:
Checking filesystems
/dev/hda2 is mounted. e2fsck: Cannot Continue, aborting.

/var: clean, 4162/1860480 files, 1333706/3717031 blocks.

And dumps me back to the repair prompt.

Any additional suggestions?
 
Old 05-08-2003, 01:12 PM   #4
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
what did you do to fstab? can we see a copy of what it looks like?
 
Old 05-08-2003, 01:15 PM   #5
Vengent
LQ Newbie
 
Registered: May 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Sure it is.

LABEL=/ / ext3 defaults 1 1
LABEL-/boot /boot ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/var /var ext3 defaults 1 2
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom is09660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

Pardon the spacing, having to type all this on a second machine while reading it off the first.

What I had done was remove the three ones starting with LABEL, but those are back now.
 
Old 05-08-2003, 01:15 PM   #6
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
what is /dev/hda2? you may have to manually fsck it
 
Old 05-08-2003, 01:21 PM   #7
Vengent
LQ Newbie
 
Registered: May 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I believe /dev/hda2 is where my / partition is.

I tried doing a manual fsck, got the error about it being mounted, went ahead and did it anyways, it came back clean.


Ugh, I just found it. Typo in the fstab. I had corrected it without noticing when I was typing it over to the bbs.

I had LABEL=/ twice instead of LABEL=/boot on the second one.

Apologies for the dumb questions, and appreciate the link, I had bounced around redhat's site, but hadn't landed on that particular one.

Thanks,

Vengent
 
Old 05-08-2003, 01:27 PM   #8
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
so what is on /dev/hda1?

are /dev/hda1, 2, and 3 the only partitions you have?

I'm not familiar with the 'LABEL=' type notation... I'm more
used to
device mount-point fstype options 0 0

how does LABEL specify the device?
 
Old 05-08-2003, 01:30 PM   #9
Vengent
LQ Newbie
 
Registered: May 2003
Posts: 5

Original Poster
Rep: Reputation: 0
/dev/hda1 = /boot
/dev/hda2 = /
/dev/hda3 = swap
/dev/hda4 = Dunno, fdisk says its a win95 extended, but this box has nothing but rh73 on it, and this partition is exact same size as hda5

/dev/hda5 = /var

I'm afraid I don't have any info on LABEL, the system added those during install with disk druid.
 
Old 05-08-2003, 01:43 PM   #10
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
if I may suggest...

# begin /etc/fstab
/dev/hda1 /boot ext3 defaults 1 1
/dev/hda2 / ext3 defaults 1 1
/dev/hda3 swap swap defaults 0 0
/dev/hda5 /var ext3 defaults 1 1
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom is09660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
# end /etc/fstab
 
Old 05-08-2003, 01:46 PM   #11
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
The first thing I did was edit the /etc/fstab file to the /dev/hdXX stuff as the label stuff confused me and wasn't informative. Redhat and Mandy do some strange things...
 
Old 05-15-2003, 06:08 PM   #12
Catt
LQ Newbie
 
Registered: May 2001
Location: Pennsylvania
Distribution: Redhat
Posts: 16

Rep: Reputation: 0
bad first line in etc/fstab

I'm having a problem similar to Vengent and also did a bonehead thing....ended up saving the fstab file with erroneous characters in the first line. When booting into RH 9 does not get past trying to boot the root partition. I know what I have to change in /etc/fstab, but I can't gain write access to the file.

I've tried rescue mode, but it won't load sysimage. The shell I get dropped into doesn't contain the /etc/fstab file.

I know my first line is messed up, but I think I'm missing my second line as well...referring to LABEL=/boot

My /etc/fstab reads as follows:
Code:
erroneous characters that don't belong then the rest:
LABEL=/		ext3            default             1 1
none		/dev/pts        devpts   gid=5,mode=620   0 0
none		/proc    	proc       defaults   0 0
none		/dev/shm     	tmpfs      defaults   0 0
/dev/hda8	swap         	swap       defaults   0 0
/dev/cdrom	/mnt/cdrom    udf,is09660 noauto,owner,kudzu,ro 0 0 0
/dev/fd0	/mnt/floppy               auto noauto,owner,kudzu 0 0
/dev/hda1	/mnt/windows    vfat  	  auto,umask=0 0 0
/dev/hda5	/mnt/programs   vfat      auto,umask=0 0 0
Is there a way I can get write access to the /etc/fstab file via maintenance mode or rescue mode?

Last edited by Catt; 05-15-2003 at 06:21 PM.
 
Old 05-16-2003, 08:53 AM   #13
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
easiest way? download one of the run-from-cd distros like Knoppix or Demo Linux... boot one of these up. (SuSE also has one over at linuxiso.org). These will typically mount all the viewable drives they can see... from there you should be able to edit fstab.

OR, when you are dropped into rescue mode (or boot from a floppy) you can mount the partition you know has the fstab file on it and go from there.

P.S. does anyone know why its so hard to find the linux distros that run from floppies these days?
 
Old 05-16-2003, 02:30 PM   #14
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
P.S. does anyone know why its so hard to find the linux distros that run from floppies these days?
Why not roll your own....
http://www.tldp.org/LDP/Pocket-Linux...tml/index.html
 
Old 05-16-2003, 02:34 PM   #15
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
nice!, I'll have to keep that in mind. thnx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
What is fstab? sceadu Linux - Newbie 2 11-02-2004 07:25 PM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM
Help with /etc/fstab wawosz Linux - General 3 04-24-2003 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration