LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 10-04-2007, 09:04 AM   #1
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
Need Help, Error in /etc/fstab and mount. system is read-only.


Hello everyone,
I have some stange issue that I need your help in,
suddenly my system became 'Read-Only',


when tried:
Quote:
/bin/mount -o remount -a
it returns:
Quote:
[mntent]: line 2 in /etc/fstab is bad
[mntent]: line 3 in /etc/fstab is bad
[mntent]: line 5 in /etc/fstab is bad
[mntent]: line 6 in /etc/fstab is bad
[mntent]: line 7 in /etc/fstab is bad; rest of file ignored
my /etc/fstab looks like this:
Quote:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0,usrquota,grpquota 1 1
LABEL=/boot /boot ext3 none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 0 0
none /proc proc none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 0 0
none /sys sysfs none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 0 0
/dev/VolGroup00/LogVol01 swap swap none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 0 0
/var/tmpFS /tmp ext3 /var/tmpFS /tmp ext3 rw,noexec,nosuid,nodev,bind 0 0 0 0
I cannot edit it because it says "Read-Only file system",

mount returns nothing:
Quote:
[root@hostname ~]# mount
[root@hostname ~]#
fdisk -l returns:
Quote:
Disk /dev/hda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 38913 312464250 8e Linux LVM

Disk /dev/sda: 72.8 GB, 72839168000 bytes
255 heads, 63 sectors/track, 8855 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 8855 71127756 8e Linux LVM
When trying to make new directory called 'test':
Quote:
mkdir: cannot create directory `test': Read-only file system
df -f
Quote:
df: cannot read table of mounted filesystems: No such file or directory

I am more then desperate for help here, I have no longer ideas about what can I try and do.
Any assistant would be great!
Hope that someone here can help me..

Thanks ahead and Best regards,
Ord.
 
Old 10-04-2007, 10:25 AM   #2
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
Pleae run fsck on the partion and it will fix it.
 
Old 10-04-2007, 10:32 AM   #3
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mokku View Post
Pleae run fsck on the partion and it will fix it.
tried it on all devices at fdisk -l, returns:

Quote:
fsck /dev/hda
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda

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 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>
Quote:
[root@hostname ~]# fsck /dev/hda1
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
/boot: clean, 38/26104 files, 15835/104388 blocks
[root@hostname ~]# fsck /dev/hda2
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda2

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 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>
Quote:
fsck /dev/sda
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda

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 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>
still dont work
 
Old 10-04-2007, 12:07 PM   #4
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
run it again and put the superblock number. You can find the nunmber using the following command.

mkefs -n /dev/hda1
 
Old 10-05-2007, 09:13 AM   #5
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mokku View Post
run it again and put the superblock number. You can find the nunmber using the following command.

mkefs -n /dev/hda1
-bash: mkefs: command not found
did you ment mkfs ?

Quote:
[root@hostname ~]# mkfs -n /dev/hda2
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
39059456 inodes, 78116062 blocks
3905803 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=79691776
2384 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616

[root@hostname ~]#
this is what the command returns, how can i know the blocknumber?

Last edited by ord; 10-05-2007 at 09:19 AM.
 
Old 10-08-2007, 09:53 AM   #6
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
someone maybe knows how to fix it? im desperate
 
Old 10-08-2007, 03:50 PM   #7
LoneGunman
LQ Newbie
 
Registered: Oct 2007
Distribution: Red Hat ES 4
Posts: 10

Rep: Reputation: 0
The previous post was stating to run fsck, not an fdisk. Fsck is a file system repair utility that will repair bad superblocks and unreferenced inode files. I would suggest: fsck -y

That will give the utility an automatic "yes" when it asks if you want to repair inode abc. Hope this helps.
 
Old 10-09-2007, 10:31 AM   #8
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by LoneGunman View Post
The previous post was stating to run fsck, not an fdisk. Fsck is a file system repair utility that will repair bad superblocks and unreferenced inode files. I would suggest: fsck -y

That will give the utility an automatic "yes" when it asks if you want to repair inode abc. Hope this helps.
Quote:
[root@hostname ~]# fsck -y /dev/hda2
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda2

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 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>

[root@hostname ~]#
it doesnt work.
 
Old 10-09-2007, 11:28 AM   #9
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 366

Rep: Reputation: 44
Try
Code:
fsck.ext3 -y /dev/hda2
 
Old 10-09-2007, 03:54 PM   #10
ord
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by doublejoon View Post
Try
Code:
fsck.ext3 -y /dev/hda2
Quote:
[roothostname ~]# fsck.ext3 -y /dev/hda2
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/hda2

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 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>

[root@hostname ~]#
same error
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read-only mount error at boot cheetahman Suse/Novell 7 03-21-2005 06:16 PM
Read-only mount error at boot cheetahman Suse/Novell 9 03-07-2005 02:33 AM
Can Fedora Core 3 mount and read vmfs file system smkamene Linux - Software 2 01-24-2005 09:24 PM
Compiled RH7.3 to read WinXP NTFS partition, mounts in Console, but can't mount fstab BlackDogg Linux - Newbie 20 08-05-2002 11:15 PM


All times are GMT -5. The time now is 07:17 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration