Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I messed up my fstab
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Tii
l33t
l33t


Joined: 02 Jan 2004
Posts: 733

PostPosted: Fri Jan 02, 2004 9:35 am    Post subject: I messed up my fstab Reply with quote

I'm pretty much a newbie and because of that I wrote over my fstab and a few other files. Anyway I noticed that and decided to correct it so that my system would still work. I tried to look that the files would be as they should. The problem is that I put 2 numbers in wrong places in fstab and now my system doesn't work. I get some kind of error and then I can log in using root password to fix this error. The problem is that to fix it I would have to edit fstab but it just says that it's read-only. I tried to look an answer but I couldn't find anything. Could somebody please help me correct this. And please give detailed instructions or point me to them since I can't undestand complicated thing about gentoo or linux just yet. Thank you.
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 739
Location: Inside

PostPosted: Fri Jan 02, 2004 9:44 am    Post subject: Reply with quote

Hey, I just saw this yesterday!
https://forums.gentoo.org/viewtopic.php?t=120022
Hope that helps you.
Back to top
View user's profile Send private message
RedDawn
Guru
Guru


Joined: 22 Sep 2003
Posts: 368
Location: Los Angeles, California

PostPosted: Fri Jan 02, 2004 9:46 am    Post subject: Well i just installed my system so i might as well! Reply with quote

Hey Well what u wanna do is boot of from the Gentoo CD...

mount your partition like you did during the install!
and chroot to the gentoo system!
or just edit the file from the live cd once you have mounted the partitions!

Im sorry im not detailed im sleepy and i just installed my system from stage1! :twisted:
Back to top
View user's profile Send private message
Tii
l33t
l33t


Joined: 02 Jan 2004
Posts: 733

PostPosted: Fri Jan 02, 2004 10:06 am    Post subject: Reply with quote

I think I just messed up my entire system so I'm just gonna reinstall. It's just a couple of days and I'm still on holiday do I've got the time.
Back to top
View user's profile Send private message
liquidice
n00b
n00b


Joined: 27 Dec 2003
Posts: 15

PostPosted: Fri Jan 02, 2004 12:37 pm    Post subject: Reply with quote

Sorry to hear this.
Just some friendly advice.
I keep a printed handwritten journal for sensitive info like my fstab. I have messed up my fstab in the past and my journal allowed me to recover it.

Why handwritten ? Because when I do mess things up, softcopies are usually gone but I can still look at my paper journal.
Back to top
View user's profile Send private message
Tii
l33t
l33t


Joined: 02 Jan 2004
Posts: 733

PostPosted: Fri Jan 02, 2004 1:05 pm    Post subject: Reply with quote

Yeah that's a really good idea. I wrote down everything I did during the install in case I'd have to do it again. I had my fstab written down but I didn't check it as many times as I should have since I made a mistake. It's actually a good thing I had to reinstall since I had my hard disk partitioned so that I wouldn't have been able to use almoust half of it at all. I have no idea why I did that in the first place.
Back to top
View user's profile Send private message
didl
Retired Dev
Retired Dev


Joined: 09 Sep 2003
Posts: 1106
Location: Pittsburgh, PA

PostPosted: Fri Jan 02, 2004 2:46 pm    Post subject: Reply with quote

Derryth wrote:
Yeah that's a really good idea. I wrote down everything I did during the install in case I'd have to do it again. I had my fstab written down but I didn't check it as many times as I should have since I made a mistake. It's actually a good thing I had to reinstall since I had my hard disk partitioned so that I wouldn't have been able to use almoust half of it at all. I have no idea why I did that in the first place.


I'd actually recommend that you make a backup copy of your entire
/etc directory tree and store it on a floppy or CD. It is not very large
and contains a lot of important config information which might be hard
to recover if you loose it. I do this one or twice every month. :lol:
Back to top
View user's profile Send private message
wishkah
Guru
Guru


Joined: 09 May 2003
Posts: 441
Location: de

PostPosted: Fri Jan 02, 2004 4:51 pm    Post subject: Reply with quote

More detailed instructions how to repair:

You take the gentoo install cd (you could also use knoppix, that would be different) and boot form it like you did during the install. After it booted, you mount your root partition (the one gentoo was installed on, probably /dev/hda3) to /mnt/gentoo/ by using this command:

Code:
mount /dev/hda3 /mnt/gentoo


Now you use nano to edit the fstab by using this command:

Code:
nano -w /mnt/gentoo/etc/fstab


You correct the settings and save the file. After that, you unmount the root partition again:

Code:
umount /mnt/gentoo


Now reboot (shutdown -r now or simply reboot) and you should be set.

I hope you know what to change in the fstab. Otherwise, read about it (google "linux fstab").

EDIT: I agree with didl, just put something like cp -R /etc /root/etc_bkp into your /etc/conf.d/local.start and you are on the safe side.
_________________
if only I could fill my heart with love...
Back to top
View user's profile Send private message
liquidice
n00b
n00b


Joined: 27 Dec 2003
Posts: 15

PostPosted: Sat Jan 03, 2004 3:05 am    Post subject: Reply with quote

I agree with keeping a backup of "/etc", that's the kind of things I do too.
However I still keep a handwritten or printed out copy of vital stuff for those occasions when I have messed up thing very badly. For example it has happen to me to mess up my usb settings so that I couldn't read my usb zip drive where I keep my backups.
Also, writing things down forces me to think about what I write and learn about things.

Anyways, it's a good idea to keep backups and by all means do, but sometimes you can still get stuck kind of like using the network to report that the network is down.

Note: You can still loose your paper journal, your cat could eat it etc... :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum