LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-16-2008, 12:19 AM   #1
tovohery
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: 0
How to edit file and make read/write / on "repair filesystem" mode?


Due to mistake change /etc/fstab. When Redhat AS 4.4 bootup, it stop in middle and asked me login as "root" to fix it.

when I tried to vi /etc/fstab, it show "read ONLY". I can NOT change it. does there has way to edit file on "repair filesystem" mode and make the / mount point read/write

Thanks.
 
Old 02-16-2008, 01:22 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Boot up in the rescue mode and try to mount the partition manually.
 
Old 02-16-2008, 02:35 AM   #3
tovohery
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
i'm new with linux, here is the result of df-k and fdsik.

#df –k
Filesystem 1K-blocks Used Available use% Mounted on
Roots 7163 5325 1429 79% /
/dev/root.old 7163 5325 1429 79% /
/tmp/loop0 187072 187072 0 100% /mnt/runtime

#fdisk –l /dev/sda

Disk /dev/sda: 161.0GB

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 514048+ 83 Linux
/dev/sda2 65 3251 25599577+ 82 Linux swap
/dev/sda3 3252 19581 120929287+ 5 Extended

Could you tell me how to mount manually /dev/sda3?

Thanks in advance
 
Old 02-17-2008, 03:35 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It looks like that is the extended partition. There doesn't seem to be any partitions created inside it.
[code]
/dev/sda1 * 1 3786 30409287 7 HPFS/NTFS
/dev/sda2 3787 3982 1574370 82 Linux swap / Solaris
[code]/dev/sda3 3983 12161 65697817+ f W95 Ext'd (LBA)[code]
/dev/sda5 3983 4635 5245191 83 Linux
/dev/sda6 4636 12161 60452563+ 83 Linux
[code]

Furthermore, the partition type isn't a mountable partition. It looks like the partition table has been corrupted and is missing an entry or the type byte is wrong. It may be fixable if the partition itself is OK.

A) If the type byte is wrong you could change the type of /dev/sda3. If Redhat AS 4.4 configures it's filesystem with /boot, swap and an lvm volume, change the type to "df".
B) If there should be another entry for a partition inside the extended partition, then you can simply create it in fdisk.
The start should be 4636 and the end should be 12161. The type again probably should be "df". After writing back the partition try running "lvmdiskscan" or "vgscan" and see if they find it.
C) What does /etc/fstab show for the root partition? The LVM partition is a volume which itself may contain partitions.
 
Old 02-17-2008, 05:54 PM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
"Code:" blocks

tovohery,
Learn to use "Code:" blocks for command output. Use the '#' button above the text input box in "Post Reply" or "Advanced Mode". It will preserve the spacing/formatting of the output you are posting.

jschiwal,
Would you mind fixing your "Code:" block(s), there are no closing '[/code]' tags, so I don't know what goes where & can't understand what point you are trying make in it/them.
 
Old 02-18-2008, 01:39 AM   #6
tovohery
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
I fix the problem now. I just use the repair system mode and recreate the fstab manually to mount the partition that store the backup file and then restart the system in rescue mode and restore all the files needed in the backup partition.
Thanks.

Regards
 
  


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
How modify fstab when its 'ro' in "repair filesystem" mode ? emuub Linux - Software 3 03-24-2011 07:46 AM
Root filesystem stuck in "read only" mode. tunrau Linux - Newbie 8 08-21-2004 12:25 PM
RH9 "remounting root filesystem in read-write mode" ChrisHax Linux - Newbie 3 07-23-2004 09:54 PM
"read-only filesystem" occurs in make install davemar Linux From Scratch 2 03-11-2004 09:33 AM
How do I change "fstab" to Write/Edit Mode? sharathkv Linux - Newbie 4 07-29-2003 07:52 AM


All times are GMT -5. The time now is 12:07 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