Labels

Sunday, 19 April 2015

A little fun with "/etc/inittab"

In this section I am gonna to play with "/etc/inittab" file, which manages booting of LINUX system ( remember this will work with all LINUX distros.).

  1. Start your system and enter into "grub" boot menu.

  2. On grub menu enter "e" while highlighting the default boot menu.

  3. After that, you will see a command similar to "auto rhgb quiet". On that, at last enter "single" or " 1" and press enter.
  4. After that you will see previous menu, and then press "b" for booting through single user.
  5. After a while you are able to see your terminal with  a hash at end "#". "#" sign describe that you will enter into your system as a root user and have all power that a root user had.
  6. Enter command "vi /etc/inittab". This will open vi editor with inittab file to edit.
  7. Press "i" ( that will make you edit currently open file ) , in our case "inittab" file is open.
  8. At last you see "id:[1-5]:initdefalut" depending upon your boot settings.

Here, you will see a lot of options regarding booting of your system. You can select form this list and choose your opinion you want to make your system to boot. A sample is shown for you.

  • At last when you see "id:[0-5]:initdefalut", change [0-5] from the option you see above this line.
  • After make changes press Esc key( using this you can exit from editing file ), and then  ":" or "Shift + ;" ( using this you can enter a command for vi editor).
  • Enter "wq" ( this will force vi editor to save and exit ).
  • I am using "6". This will make system reboot every time you power up your system.

To again make changes follow steps 1 to 8 and after that choose the option you want to make your system to boot from.

No comments:

Post a Comment