LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 11-11-2009, 12:35 PM   #1
jedispy
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Rep: Reputation: 0
Oops...I broke fstab on Centos 5.3


I was dabbling with some CIS 6.1.1 guidelines and I misread the part about adding "nodev" to the "/dev/VolGroup00/LogVol00 / ext3 defaults 1 1" line. I accidentally entered it as
Code:
nodev,/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
After a reboot my system won't mount. It trips during bootup at the line that reads
Code:
fsck.ext3: No such file of directory while trying to open nodev,/dev/VolGroup00/LogVol00
nodev,/dev/VolGroup00/LogVol00:
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 filesystem (and no 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>
Here's what I've tried
  1. When this error comes up it dumps me out to emergency mode, which is of course read-only. I can't really do anything useful here from what I can tell. I certainly can't edit fstab, which is the source of the error
  2. I tried going into rescue mode with my centos installation media, but the rescue operation can't properly mount the volume (I assume since fstab is borkificated).
  3. Single user mode fails for the same reason a straight boot up fails.
  4. Interrupting GRUB loader by entering cmd prompt and manually running "mount -t ext3 /dev/VolGroup00/LogVol00".
So far none of these have worked at all. Is there any way for me to edit fstab and allow for a successful mount of /dev?

Thankfully this is just a test machine, and not used in production at all.
 
Old 11-11-2009, 12:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,794

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
use a rescue cd, and just don't search for existing systems, then mount / yourself manually and edit away.
 
Old 11-11-2009, 01:02 PM   #3
jedispy
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Alas, my problem. I just gave your recommendation a shot. When I go into rescue mode and skip the autodiscover, I run the cmd "mount -t ext3 /". I get the error
Code:
mount: Cannot read /etc/fstab: No such file or directory
I really did a number on this one. Ha ha.

Someone else mentioned using a liveCD. I haven't used liveCD much, so a little clarification is needed. How could I edit the /etc/fstab on my filesystem via liveCD? Won't it only show the relative fstab for the liveCD mount?
 
Old 11-11-2009, 01:12 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,737
Blog Entries: 5

Rep: Reputation: Disabled
From within the live cd environment, mount your host's / filesystem somewhere (e.g. /mnt/foo). Then edit /mnt/foo/etc/fstab as needed.
 
Old 11-11-2009, 02:51 PM   #5
jedispy
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
When I attempt that i get
Code:
mount: /dev/VolGroup00/LogVol00 already mounted or /mnt busy
Strangely I can't seem to use "unmount" here. Is there an alternative to unmount in Centos?
 
Old 11-11-2009, 05:31 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 10,436

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
The command is "umount" - odd but true. But if you are using a Redhat derivative like Centos that probably won't work as that will be a filesystem for the CD itself. Use another liveCD that has LVM support - Knoppix used to.
 
Old 11-12-2009, 12:30 AM   #7
prik420
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Rep: Reputation: 0
Here's what I've tried
  1. When this error comes up it dumps me out to emergency mode, which is of course read-only. I can't really do anything useful here from what I can tell. I certainly can't edit fstab, which is the source of the error
  2. I tried going into rescue mode with my centos installation media, but the rescue operation can't properly mount the volume (I assume since fstab is borkificated).
  3. Single user mode fails for the same reason a straight boot up fails.
  4. Interrupting GRUB loader by entering cmd prompt and manually running "mount -t ext3 /dev/VolGroup00/LogVol00".
So far none of these have worked at all. Is there any way for me to edit fstab and allow for a successful mount of /dev?

[/QUOTE]

In rescue mode, the LVM system isn't activated by default. Run these commands at the command prompt upon booting to rescue mode:

#lvm vgscan
#lvm vgchange -ay

To display your lvm partitions, run:

#lvm lvs

By then, you should be able to mount the / LVM partition.

I hope this helps. cheers!
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with boot CentOS 5 can't edit fstab ytd Linux - General 1 08-07-2009 05:02 PM
oops broke my jack ninja master Linux - Software 0 03-24-2009 04:44 AM
CentOS release 4.6 (Final) - Kernel Oops harry edwards Linux - Server 2 03-17-2008 05:11 PM
Broke my Graphical User Login! (oops!) griffwolf Linux - Newbie 3 05-05-2007 03:45 PM
Centos and fstab tuxgurz Linux - General 1 08-03-2005 01:49 PM


All times are GMT -5. The time now is 11:27 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration