Linux Booting Issues : How to solve ??

Here we are going to see how to resolve the common booting issues in Linux. Hope this may help you bit.

Option 1: init not found error
Option 2: Run fsck on all FS in rescue mode
Option 3: Reinstall GRUB
Option 4: Recover grub.conf / grub configuration

Option 1: For normal panic and "init not found" error.

Error : "init not found" displayed

1) Launch the system to Bash shell prompt

Reboot the server and interrupt to edit the GRUB.

Edit grub and enter the below in last

init=/bin/bash

Then save and exit and boot the server. This will launch you straight into a Bash shell prompt.Then you can remount “/” file system and check /var/log/messages for any error.

Note :  init=/bin/bash (Grub boot loader) or linux init=/bin/bash (if Lilo boot loader).

2) Once server booted and if it is in Bash shell prompt

 #mount -o remount,rw /

3) Now  you can check the log messages and try to find the reason for server pacnic or error.

#more /var/log/messages


Option 2:  If the above option not helped then follow the next

1) Boot from the Linux First CD (boot CD).

2) Type “boot rescue” at Linux boot prompt.

3) After the bash shell prompt show up, type the below command

   # chroot /mnt/sysimage

a) Run fsck and Check for any disk error

  #fdisk -l /dev/sda  //check how many partion you have

   then run fsck on each partition
    
  #fsck -y /dev/sda2'



Option 3: If the above also not helped then try to reinstall grub and retry.

 In rescue mode.

   #  chroot /mnt/sysimage

   # /sbin/grub-install /dev/hda


Option 4: If a system has issues with the GRUB configuration

(possibly caused by incorrect changes to the the GRUB configuration file, installation of another OS, changes to device ordering due to hardware or BIOS changes, etc.)

   # grub> find /boot/grub/grub.conf (or) grub>find /grub/grub.conf  (or) find /boot/grub/stage1
    (hd0,1)
    (hd1,2)

    >> This tells us that we have two /boot partitions. Then we have to reinstall the GRUB config on disk (one by one) and try.

   #grub> root (hd0,1)    //Write the GRUB boot loader on the MBR of the first disk
    grub> setup (hd0)
    grub>quit

  If you have doubt as to where the root partition is located then try to find a file in /etc.
 
    #grub> find /etc/fstab
      (hd0,1)


Note: You must pay attention to your devices, for me "hd0" is the root disk and (hd0,1) is /boot partition , and (hd0,1) is my ROOT (/) partition. mostly / "root" partion will be on LVM.


       You might not even have "hd0" mapped out. Review your "/boot/grub/device.map" file

      #cat /boot/grub/device.map




Post a Comment

1 Comments

  1. best article i ever read on net regard these issues.

    ReplyDelete