LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   Need Help, Error in /etc/fstab and mount. system is read-only. (http://www.linuxquestions.org/questions/red-hat-31/need-help-error-in-etc-fstab-and-mount-system-is-read-only-589395/)

ord 10-04-2007 09:04 AM

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.

mokku 10-04-2007 10:25 AM

Pleae run fsck on the partion and it will fix it.

ord 10-04-2007 10:32 AM

Quote:

Originally Posted by mokku (Post 2913109)
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

mokku 10-04-2007 12:07 PM

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

mkefs -n /dev/hda1

ord 10-05-2007 09:13 AM

Quote:

Originally Posted by mokku (Post 2913208)
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?

ord 10-08-2007 09:53 AM

someone maybe knows how to fix it? im desperate

LoneGunman 10-08-2007 03:50 PM

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.

ord 10-09-2007 10:31 AM

Quote:

Originally Posted by LoneGunman (Post 2917584)
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.

doublejoon 10-09-2007 11:28 AM

Try
Code:

fsck.ext3 -y /dev/hda2

ord 10-09-2007 03:54 PM

Quote:

Originally Posted by doublejoon (Post 2918528)
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 :(


All times are GMT -5. The time now is 10:44 PM.