Cannot boot in CentOS

Installing, Configuring, Troubleshooting server daemons such as Web and Mail

Cannot boot in CentOS

Postby handle123 » 2012/05/31 23:38:39

Hi,

Can someone help with this booting issue?

My PC has 2 hard drives, one IDE and one Sata, with several disk partitions on the Sata drive and with both Windows XP and CentOS residing on the same larger Sata drive. It could dual boot into either CentOS or Windows XP until recently.

I recently installed a newer version 5.5 of CentOS over the same old Linux partition. When booting up there is now a "grub>" prompt and nothing happens after this.

I typed boot and got:

Error 8: Kernel most be loaded before booting.

I tried both OS upgrade and fresh installation and ran into the same problem.

I boot into the Rescue mode using CD 1 of CentOS. Here is the output of fdisk -l, /boot/grub/device.map, /boot/grub/grub.conf, df -h. What changes are needed so that grub will display a boot menu instead of the grub prompt and will boot properly? Thank you.

fdisk -l
=========
Disk /dev/hdc: 40.0 GB .... (this is the small IDE Windows data drive)
...

Disk /dev/sda: 250.0 GB ... (this is the larger Sata drive with the two OS)

Device Boot Start End Blocks Id System
/dev/sda1 * .........................7 HPFS/NTFS <-- XP is here
/dev/sda2 ............................b W95 FAT32
/dev/sda3 ............................f W95 Ext'd (LBA)
/dev/sda5 ............................7 HPFS/NTFS
/dev/sda6 ............................7 HPFS/NTFS
/dev/sda7 ..............640K blk 83 Linux <--CentOS
/dev/sda8 ..........65,954K blk 8e Linux LVM <-- CentOS

/boot/grub/device.map
======================
(hd0) /dev/hdc
(hd1) /dev/sda

/boot/grub/grub.conf
=====================
default=0
timeout=5
splashimage=(hd1,6)/grub/splash.xpm.gz
hiddenmenu

title CentOS (2.6.18-194.el5xen)
root (hd1,6)
kernel /xen.gz-2.6.18-194.el5
module /vmlinuz-2.6.18-194.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-194.el5xen.img

title CentOS-base (2.6.18-194.el5)
root (hd1,6)
module /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-194.el5.img

title Other
rootnoverify (hd0,0)
chainloader +1

df -h
=======
/dev/VolGroup00/LogVol00 58 G (mounted on /)
/dev/sda7 578 M (mounted on /boot)

It seems that CentOS is confused between hd0 and hd1. Although both Windows XP and CentOS reside on the same Sata drive, grub.conf is using hd1 for CentOS and hd0 for windows XP. I tried to interchange the hd1 and hd0 in grub.conf and device.map files but that did not help.

I can boot up CentOS partially using this manual procedure:

I followed the example at

http://forums.fedoraforum.org/showthread.php?t=211383

to manually boot up the OS. It boots up partially and got stuck at

Setting clock (localtime): .... [OK]
Starting udev: <-- stuck here

Example:
=======
grub> find /grub/stage1

(hd0,6)

grub> root (hd0,6)

grub> kernel /vmlinuz-[version stuff here] [parameters here]

Possible files are:
vmlinuz-2.6.18-194.el5 vmlinuz-2.6.18-194.el5xen

grub > kernel /vmlinuz-2.6.18-194.el5

grub> initrd /initrd-[version stuff here].img

Possible files are:
initrd-2.6.18-194.el5.img initrd-2.6.18-194.el5xen.img

grug> initrd /initrd-2.6.18-194.el5.img

grub> boot
...
Setting clock (localtime): .... [OK]
Starting udev: <-- stuck here

I can manually boot into windows using this procedure:

grub> chainloader (hd0,0)+1
grub> boot
handle123
 
Posts: 17
Joined: 2012/05/31 23:03:40

Cannot boot in CentOS

Postby pschaff » 2012/06/01 02:07:23

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

You should not install obsolete/buggy/unsupported versions. Try it with 5.8 or perhaps better 6.2 and report results if you have trouble with those. See also:
http://wiki.centos.org/TipsAndTricks/ReinstallGRUB
http://wiki.centos.org/TipsAndTricks/TroubleshootGRUB
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America


Return to CentOS 5 - Server Support

Who is online

Users browsing this forum: No registered users and 1 guest