LinuxQuestions.org
Help answer threads with 0 replies.
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 10-29-2005, 12:35 AM   #1
tdog
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Rep: Reputation: 0
Question Edit file from Rescue Mode?


I have a machine with a broken cd drive. So in order to install linux onto the hard drive I removed it and placed it into another machine which has a working CD drive. All went fine, however, that second machine also has an aditional hard drive, which after the install became listed in /etc/fstab

Now the drive is back in the original machine and it "obviously" can't find LABEL=/extra so it won't boot and drops me into rescue mode. I could fix this (I think) by just getting rid of the "LABEL=/extra" line in /etc/fstab but how do I do that from rescue mode?

Am I going to have to take apart both machines and swap drives again in order to fix this?
 
Old 10-29-2005, 01:36 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
vi /etc/fstab
move to the line with the non-existing hdd and press
dd
:wq

Done


Cheers,
Tink
 
Old 10-29-2005, 12:34 PM   #3
tdog
LQ Newbie
 
Registered: Oct 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Yes, I'm sorry, I should have been more clear. I did try to edit with vi. The problem is that under rescue mode everything is read only, regardless of the file's permisions. Is there a way to get arround this?
 
Old 10-29-2005, 01:59 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Quote:
The problem is that under rescue mode everything is read only,
Now that would make for a pretty worthless rescue mode!
I suspect that your problem is in using /etc/fstab instead of just etc/fstab.
On my FC4 rescue cd, I type chroot /mnt/sysimage
Then, I verify that I'm looking at the hard drive fstab and not the one on the cdrom...
cat etc/fstab
vi etc/fstab
press the insert key
make changes
press the escape key
type :wq!
then check your work again with cat etc/fstab
 
  


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
rescue mode hansi umayangan Linux - General 1 03-16-2005 11:43 PM
mounting '/ ' file system on linux rescue mode ?? bipinkdas Red Hat 2 01-25-2005 10:16 AM
Edit file in rescue mode DanielTan Linux - Newbie 1 09-19-2004 11:44 AM
Rescue problem - How do I edit /etc/fstab without vi? mwarren2 Linux - Software 7 08-13-2004 05:46 PM
Edit a file in single-user mode ricardocastro Linux - Software 2 02-26-2002 04:37 PM


All times are GMT -5. The time now is 06:37 AM.

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