LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-11-2006, 06:27 AM   #1
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Rep: Reputation: 15
Read-only file system???


I'm trying to recover a root account someone renamed by accident.

I get as far as logging into # and editing /etc/passwd, but when I try to save it, I get the message that the file-system is read-only!

How can I get this little problem sorted out?


ADDED: I tried :wq! already

Last edited by kinetik; 01-11-2006 at 06:29 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-11-2006, 06:56 AM   #2
openbysource
Member
 
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66

Rep: Reputation: 15
Hi,

Issue the following command before editing the /etc/passwd file

mount -o remount, rw X /

in place of X specify the disk label where your Linux system partition resides mine is
/dev/hda5

Now you can edit the file.


Regards
Be Open By Source
 
Old 01-11-2006, 07:05 AM   #3
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Original Poster
Rep: Reputation: 15
Thanks man, but it still doesn't do anything...


I did a mount -o remount, rw X /dev/sda2

It only gives me information on the mount command itself (this system's a bit messed up).


Any other ideas?
 
Old 01-11-2006, 07:07 AM   #4
openbysource
Member
 
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66

Rep: Reputation: 15
Hey man u need to grow up

I said replace X with /dev/sda2.

Now issue the following command:


mount -o remount, rw /dev/sda2 /

remember to put the forward slash at the last


man u need to grow up really i m telling u seriously !
 
Old 01-11-2006, 07:53 AM   #5
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Original Poster
Rep: Reputation: 15
OK, was that sarcasm / trying to be funny and failing miserably / genuine irritation?

I'll refrain from calling you an a-hole since you tried helping me out, and because I didn't read what was on the screen.

Another reason I'll refrain from insulting you is because it still doesn't work and I could use some further assistance, message being:

mount: /dev/sda2 not mounted already, or bad option


<seriously now>
If you could help me out here I'd really appreciate it.
</seriously now>


ADDED: Come on OpenBySource, I didn't mean to offend you here or anything (sorry if I did, unintentional), just really need your help. When I run mount, it lists /dev/sda2 as rw, yet when I try to edit anything it sez read-only filesystem. I'm really stumped here!

Last edited by kinetik; 01-11-2006 at 08:39 AM.
 
Old 01-11-2006, 09:26 AM   #6
openbysource
Member
 
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66

Rep: Reputation: 15
Hey,

It doesn't matter. These kinda talks are common if something is mis-understood.


Well as far as your problems goes can you please tell me which runlevel you are:

This can be easily find out by issuing the command

runlevel


Regards
OpenSource
 
Old 01-11-2006, 10:31 AM   #7
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Original Poster
Rep: Reputation: 15
That's a relief! I appreciate your help OpenBySource!

Well, I booted up using the GRUB section found here http://linuxgazette.net/107/tomar.html (I know the root password, problem is I just never get the chance to type it in)

When I ran runlevel, here's what I got: N 5


NOTE: I'm using VMWare GSX to do this, don't know if that's of any relevance
 
Old 01-17-2006, 11:04 PM   #8
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
Interesting that you are in runlevel 5. Did you enter the password for a regular user to get to this point? Are you able to use "su -" or is it messed up because of the rename on the root account?

I'm not certain what effect renaming the root user would cause to a system. Many startup scripts and daemons usually run as root so it may upset the balance of the universe. Hopefully the person who renamed root didn't mess with any of the filesystem owners:groups otherwise there could be a real mess to clean up.

The article from linuxgazette is a good reference. I would first try booting up in single user mode. If that didn't work I would go with using a LiveCD to permit mounting of the root partition in rw mode and then edit /etc/passwd. With RedHat I know you can use the install CD's to go into rescue mode and solve the problem similar to using a LiveCD.

Bill

Last edited by wmakowski; 01-17-2006 at 11:06 PM.
 
Old 01-20-2006, 03:40 PM   #9
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Original Poster
Rep: Reputation: 15
Hi Wmakowski, thanks for your advice!

No I wasn't able to su, login as root or any of that. Even after repairing the passwd file, problems still didn't want to dissappear.

I've now reinstalled everything from scratch, with one important difference: I now made the VMWare Disk as Undoable. Now if something goes wrong and I can't figure out what the problem was, I simply reboot and say "Discard changes". Presto, system's back online and ready to roll!
 
Old 10-30-2007, 01:56 PM   #10
jackpal
Member
 
Registered: Oct 2003
Location: Florida USA
Distribution: Fedora, RHEL
Posts: 57

Rep: Reputation: 15
I know this thread is old but the problem still exists. The original poster was using GSX server which is a VMware product. I ran into the same problem on my ESX server with RHEL4 Update 4. So far one of the filesystems has gone read only twice now in a 10 days throwing my bugzilla/mysql/splunk installs into a spin. This is now a known and acked problem by VMware as of this post (Oct 30,2007).

The problem is fixed by using the patch instructions provided at the following URL:

http://kb.vmware.com/vmtnkb/search.d...20KB%20Article

Happy VMing
 
Old 04-03-2008, 05:30 AM   #11
mjlush
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 2
Quote:
Originally Posted by openbysource View Post
Hi,

Issue the following command before editing the /etc/passwd file

mount -o remount, rw X /

in place of X specify the disk label where your Linux system partition resides mine is
/dev/hda5

Now you can edit the file.

Regards
Be Open By Source
For the benefit of the next person who googles across this thread

I had a similar problem (read only in single user mode)

I found

mount -o remount, rw /dev/hda2 /

failed

however

mount -o remount, -rw /dev/hda2 /

worked (where /dev/hda2 was my root partition).
 
2 members found this post helpful.
Old 03-13-2009, 05:43 AM   #12
topsian
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 1
Wink mount remount

Thanks for this thread I managed to use it after failing to get my head around all the options for mount on the man pages. Please note that it looks that where everyone on this thread has typed or copied...

mount -o remount, rw X /

There is a space between the comma and the rw the comma is to separate option from -o. This will fail saying that you must specify the file type and return 32 (mount failure)

The command should be


mount -o remount,rw X / where X is the filesystem

cheers
 
Old 11-17-2011, 07:58 AM   #13
saltie
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by mjlush View Post
For the benefit of the next person who googles across this thread

I had a similar problem (read only in single user mode)

I found

mount -o remount, rw /dev/hda2 /

failed

however

mount -o remount, -rw /dev/hda2 /

worked (where /dev/hda2 was my root partition).
Thanks for taking the time to tell us this
 
Old 11-18-2011, 12:52 AM   #14
kinetik
Member
 
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149

Original Poster
Rep: Reputation: 15
Not related, but it's quite funny looking back at this thread now over 6 years later and seeing the way I spoke back then ("man", "dude" ).

Anyways, this just once again reminds me how great a forum this is.

Last edited by kinetik; 11-18-2011 at 12:56 AM.
 
  


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
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 03:27 AM
File system becomes read-only jkpchang Linux - Newbie 1 12-08-2004 08:23 AM
Read Only File System ptreves Linux - Newbie 1 10-24-2004 02:21 PM
read-only file system the_little_one Linux - Newbie 2 10-25-2003 07:53 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

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