Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu 11.10 on my laptop and I have managed to overwrite my /etc/inittab and /etc/init.d/rcS files while running a stupid script with sudo.

Can anyone please provide me the default installed /etc/inittab and /etc/init.d/rcS files on a ubuntu 11.10 system so that I can restore it back ?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted
$ ls -l /etc/inittab
ls: cannot access /etc/inittab: No such file or directory

So there is no inittab in my installation.

$ ls -l /etc/init.d/rcS 
-rwxr-xr-x 1 root root 117 2011-07-14 07:11 /etc/init.d/rcS

$ cat /etc/init.d/rcS 
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

exec /etc/init.d/rc S
share|improve this answer
    
thanks buddy ... ubuntu is up and running :) –  Sukanto Nov 11 '11 at 17:55
    
I'm glad that I could help! –  lgarzo Nov 11 '11 at 19:56
add comment
  1. Intall a live CD
  2. $sudo fdisk -l #Check which partition your Ubuntu is.
  3. $sudo mount /dev/sda1 /mnt # ex. My Ubuntu is on /dev/sda1
  4. $sudo chroot /mnt
  5. #cd /mnt/etc/init.d
  6. Now you can edit rcS or replace it
  7. #exit
  8. $sudo umount /mnt/
  9. sudo reboot
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.