you have the Boot related problem and told to you that make successfully boot the System. While booting system, you saw some error and stop the boot process by displaying some error messages.
Kernel Panic - not syncing: Attempted to kill init!
And no further boot process. What you will do to boot the system.
If you are getting the Kernel panic error, it means it is boot loader related problem. Redhat Enterprise Linux uses the GRUB boot loader. You can pass the kernel parameter from the boot loader as well as you can correct the kernel parameter passing from boot loader from GRUB screen at boot time.
RHEL Linux Kernel panic error
For this practical we will modify grub.conf So you can understand what exactly case the kernel panic error.always take back up before modifying grub.conf parameter
#cp /etc/grub.conf /rootopen /etc/grub.conf from vi command
Default grub.conf file look like this We suggest you to cram up this file
Now change kernel line as show below [ change forward slash / to backward slash \ ]
Save file with :wq and reboot the system
On Restart you will get kernel panic error
How to remove kernel panic error
Reboot system and press space bar on boot menu and select kernel lineNow press e for edit and you will see the wrong entry of kernel line in grub.conf
Correct the kernel parameter replace backward slash \ to forward slash / and press enter to save
This will correct this error temporary.You will get same error after rebooting the system . As change here will not change the default faulty grub.conf so after booting system don't forget to Correct the kernel parameter replace backward slash \ to forward slash /
#vi /etc/grub.conf
How remove grub.conf password
By booting system in single mode one can easily recovered root password. This could case great security risk. For this every Linux system administrator password protect the grub.conf Two types of password can be set on grub.conf one to edit the parameter in grub.conf during boot process and another to boot operating system. But what if you lost both root and grub.conf password.For this practical open grub.conf file
#vi /etc/grub.confSet password for editing just below the hidemenu option and Set password for booting the OS just below the title menu
Now save file with :wq and restart the system
Now press space bar on boot menu and press e to edit It will ask to give the password which you set below the hidemenu
After it on boot screen it will ask OS password which you set under the title menu
Now assume that you lost all three root, grub.conf and boot loader password. How will you recover these passwords.
Boot system from Linux CD and give linux rescue command on boot screen
Select language to English
Select Keyboard layout to US
Press enter on continue and it will search for linux on hard disk
We don't need networking for this operation so select no
Rescue mode will mount system image under the /mnt/sysimage folder press ok
now change chroot to /mnt/sysimage and open /etc/grub.conf
Remove both hidemenu and title password and save file
Now reboot the system and remove Linux CD from CDROM
After reboot there should be no password on OS selection screen
And on boot screen
We have recovered both boot loader and OS selection menu password now you easily recovered root password by booting system in single mode. If you feel difficulties in recovering root password check our pervious article
No comments:
Post a Comment