Grub on DOMU won't see any drives

General support questions including new installations
Post Reply
simonb
Posts: 14
Joined: 2005/02/15 13:37:53

Grub on DOMU won't see any drives

Post by simonb » 2009/04/25 07:10:28

I have a problem with a VM running Centos 5.3 on a Centos 5.2 hypervisor. Any kernel install makes the system unbootable and I have to copy an old /boot directory to get it to boot again. After some investigation I found that grub was always failing.

These are the partitions I have. xvda is the OS virtual drive. xvda1 is the /boot partitition and xvda2 is the LVM partition. A standard default install.
cat /proc/partitions
major minor #blocks name

202 0 14648448 xvda
202 1 104391 xvda1
202 2 14538825 xvda2
202 16 195313152 xvdb
202 17 195310206 xvdb1
253 0 11337728 dm-0
253 1 2031616 dm-1
253 2 190840832 dm-2

Apparently, this file could be suspect. But it seems to be OK according to what I have read.
cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0) /dev/xvda



If I try to re-install grub I get...
Attempt 1)
grub-install hd0
/dev/xvda1 does not have any corresponding BIOS drive.

Attempt 2)
grub-install /dev/xvda
expr: non-numeric argument
/dev/xvda1 does not have any corresponding BIOS drive.

Attempt 3)
grub-install --recheck hd0
Probing devices to guess BIOS drives. This may take a long time.
No suitable drive was found in the generated device map.
Reverting to backed up copy.

Attempt 4)
grub-install --recheck /dev/xvda
Probing devices to guess BIOS drives. This may take a long time.
No suitable drive was found in the generated device map.
Reverting to backed up copy.

Attempt 5)
grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd0,0)
root (hd0,0)

Error 21: Selected disk does not exist


This is my grub.conf file...
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/xvda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.1.6.el5xen)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.1.6.el5xen ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-128.1.6.el5xen.img

vfsn
Posts: 1
Joined: 2009/08/31 13:05:19

Re: Grub on DOMU won't see any drives

Post by vfsn » 2009/08/31 13:12:55

Any news on that? I have exactly the same problem and can't find a solution.

Strange thing ist, after installing grub and a kernel, no menu.lst or grub.conf is generated (I'm using yum not anaconda), creating one manually does not help.

piottrek17
Posts: 4
Joined: 2013/07/13 16:10:06

Re: Grub on DOMU won't see any drives

Post by piottrek17 » 2013/07/15 09:43:11

Try this.
[code]# grub
grub> device (hd0) /dev/xvda
grub> root (hd0,0)
grub> setup (hd0)
grub> quit[/code]

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Grub on DOMU won't see any drives

Post by TrevorH » 2015/04/28 16:40:19

Yes... I know we don't like thread archaeology here but I thought I'd post to say that that solution works. And since this thread still comes out somewhere near the top of a google search I guess that's quite useful to know.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply