LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-17-2009, 09:08 AM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 597
Blog Entries: 1

Rep: Reputation: 46
cannot write to /etc/fstab under File Recovery mode


Hi,

Because I forgot to bring a portable hard drive, I cannot boot
to a linux OS. The reason is that the /etc/fstab has a line
that is

Quote:
LABEL=ext3-datadisk /ext3-datadisk ext3 defaults 1 2
and ext3-datadisk is on the portable hard drive.

The booting process stopped when it prompts for a root passwd or
Ctl-D to reboot.

I keyed in the root passwd, and a (File Recovery) prompt appeared.
I tried to vi /etc/fstab but I cannot save the edited /etc/fstab.

How can I boot successfully in this case ?

Thanks !!
 
Old 07-17-2009, 09:16 AM   #2
centguy
Member
 
Registered: Feb 2008
Posts: 597

Original Poster
Blog Entries: 1

Rep: Reputation: 46
I meant without a live CD, but just booting with the single-user mode. Is that possible at all ?
 
Old 07-17-2009, 09:43 AM   #3
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
Quote:
Originally Posted by centguy View Post
I keyed in the root passwd, and a (File Recovery) prompt appeared.
I tried to vi /etc/fstab but I cannot save the edited /etc/fstab.

How can I boot successfully in this case ?
once at the file recovery prompt
Code:
mount -o remount,rw /
then proceed with what you need to correct.

the root filesystem is still mounted read-only when dropped to file recovery ? to protect its integrity ? so you'll need to mount it read-write. since you are using it at this point you are not able to simply umount and then mount with appropriate options... this is where the remount option to mount comes in


 
Old 07-17-2009, 11:41 AM   #4
centguy
Member
 
Registered: Feb 2008
Posts: 597

Original Poster
Blog Entries: 1

Rep: Reputation: 46
rayfordj:

Exactly the solution I was looking for. Thanks a million !!
You rock!
 
  


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
Cannot edit fstab in recovery mode. Filesystem is read only james7775 Linux - General 34 08-14-2018 11:53 PM
Need to write a file in delete protected mode shiv.singh Linux - Newbie 7 05-17-2009 12:59 AM
help in single user mode - cannot write fstab Shady_Creeper Slackware 2 02-14-2007 09:15 AM
Misspelling in fstab, can't write to file system kristjan Linux - Newbie 4 01-08-2004 06:40 PM
How do I change "fstab" to Write/Edit Mode? sharathkv Linux - Newbie 4 07-29-2003 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:21 PM.

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