LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-20-2007, 02:18 PM   #1
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Rep: Reputation: 17
HELP! How to recover /etc/inittab? Accidently renamed it.


I accidently renamed /etc/inittab to /etc/inittab.bak without replacing it. After rebooting, it complains it can't find /etc/inittab and doesn't boot up. I tried booting from a live CD and I can see the file but the filesystem is read only so I can't rename.

How can I rename that file? Thanks!
 
Old 11-20-2007, 02:42 PM   #2
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
With most live-evaluation CDs, you can mount the hard drive in such a way that you have write permission. If you can bring the hard drive up as an icon in some file manager or desktop display, you might be able to right click it and change the permissions. Which live-evaluation CD are you using? You should probably also post this thread to a forum specifically dealing with that live-evaluation distro.
 
Old 11-20-2007, 02:42 PM   #3
jphilput
Member
 
Registered: Nov 2007
Posts: 58

Rep: Reputation: 15
You'll need to mount the appropriate drive as read/write. Frequently, live CDs will allow you to modify the hard drive with a command like

Code:
chroot /mnt/sysimage
The actual command will depend on which live CD you're using. If the chroot command is not available, you should be able to unmount the drive with the umount command

Code:
umount mountpoint
and then re-mount the partition with the mount command

Code:
mount -O rw device mountpoint
 
Old 11-20-2007, 03:21 PM   #4
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Original Poster
Rep: Reputation: 17
Thanks for the pointers. I have a CentOS 5 (x86_64) system, I'm using the CentOS 5 i386 Live CD since a 64bit liveCD doesn't exist for it, hope that doesn't cause any problems. I'll give it a shot now.
 
  


Reply



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
/dev/mouse renamed! Lord Zoltar Slackware 7 06-14-2007 12:08 AM
Recover/edit of /etc/inittab from GRUB sujith_marar Linux - General 1 09-11-2004 01:19 PM
Kernel panic+/etc/inittab recover problem sujith_marar Linux - Newbie 3 07-16-2004 09:51 AM
How to recover/edit /etc/inittab From GRUB sujith_marar Linux - Newbie 3 06-25-2004 10:28 AM
Recover of /etc/inittab from GRUB Bootloader in RED HAT OS 8 sujith_marar Red Hat 1 06-23-2004 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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