Wednesday 18 June 2014

GRUB Troubleshooting – 4

GRUB Troubleshooting – 4

--> Grub Boot Fails with Following Error : Error 15: File not found  & Error 17: Cannot mount selected partition
1) At the grub screen, press ‘c’ to enter command line mode
2) Tell grub to search for the grub boot files.
grub> find /grub/stage1
if no disks are returned in step 2, it indicates that grub is unable to mount and find the files. rescue mode will be required to repair the file-system and grub boot files.
Grub will attempt to access the disk listed in the ‘root’ parameter for the bootloader files (/boot/grub).
If the ‘root’ device is incorrect, or the device is inaccessible, an error will be displayed.
3) Note the disk that is returned. Usually, this will be (hd0,0)
4) Press ‘esc’ to return to the menu
5) Press ‘e’ to enter the configuration menu
6) Press ‘e’ on the root parameter, and adjust the line to match the disk that was returned earlier. Press return to save the changes.
root (hd0,0)
7) Press ‘b’ to boot with the new configuration
8) Once the machine is booted, modify the /boot/grub/grub.conf file to make the change permanent
root(hd0,0)
--> How do we activate power management or Advanced Power Management (APM) , from GRUB?
APM packages are available only for 32 bit machine. The apmd package is very old and it has replaced by “acpi”(Advanced Configuration and Power Interface) package. The acpid daemon works to control the power of the devices.
Activating APM:  Advanced Power Management features (APM) can be activated on your system by starting the APM daemon (apmd). To start this immediately, use the service command:
# service apmd start
To ensure that this daemon is enabled across reboots, use the chkconfig command:
# chkconfig apmd on
Note: In order to execute these commands, user has to be the root user.
Confirm that APM was activated :
#dmidecode | grep -i apm
#service apmd status
#/etc/init.d/apmd status
#ps aux | grep apmd
#pstree -paul| grep apmd
 
Disabling  APM:
On 32bit machine you can pass the apm parameter and its value to the kernel to disable it during booting. Just the add the “apm=off” at the end of the line contains “kernel” in the grub.conf file.
Sample grub.conf entries it will look like
default=1
timeout=7
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.4.21-20.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/
apm=off
initrd /initrd-2.4.21-20.EL.img
title Red Hat Enterprise Linux AS (2.4.21-20.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/
apm=off
initrd /initrd-2.4.21-20.ELsmp.img
And on that same machine you also need to disable the apmd daemon at the chkconfig service like :
#chkconfig apmd off
#service apmd stop
--> System kernel panics on boot with “mount: could not find filesystem ‘/dev/root’”.
System kernel panics on boot with the following information after loading GRUB and starting the boot process:
Unable to access resume device (/dev/rootvg/swap)
mount: could not find filesystem ‘/dev/root’
setuproot: moving /dev failed: no such file or directory
setuproot: error mounting /proc: no such file or directory
setuproot: error mounting /sys: no such file or directory
switchroot: mount failed: no such file or directory
kernel panic – no syncing: attempted to kill init!
This issue can occur when a yum install of a new kernel is interrupted, the initrd won’t be properly rebuilt for the new kernel resulting in many problems at boot.
 Rollback to the previously installed kernel by booting into the older kernel via the GRUB bootloader. Press any key when “Starting Red Hat Enterprise Linux in 5 seconds…” appears. Then once inside of GRUB use the arrow keys to navigate down to the second line and press the ‘b’ key to boot into the selected kernel.
To make the second kernel the default edit /boot/grub/grub.conf and modify the line default= to read:
default=1
If the above works try re-installing the kernel with yum by first removing the new kernel and then installing it. For example to reinstall the 2.6.18-308.8.1 kernel:
# yum -y remove kernel-2.6.18-308.8.1.el5.x86_64
# yum -y install kernel-2.6.18-308.8.1.el5.x86_64


No comments :

Post a Comment