grub-install cannot find device VolGroup on a ext4 partition
I have a VMwave image with CentOS 5.7 installed. The first partition (/dev/sda1) was /boot and the second was a logical volume (/dev/sda2). I have decided to remove the logical volume and combine the 2 partitions.
I setup a new VMware hard drive and formatted as a single partition (/dev/sdb1). Next I booted Ubuntu live CD and mounted the new partition and the partitions with the logical volume and then the boot partition inside as follows: Code:
mount /dev/sda2 /media/hd1 Code:
cp -avf /media/hd1/* /media/hd2 Code:
mount --bind /dev /media/hd2/dev Code:
grub-install --recheck /dev/sdb At this point I thought it should be almost done, I just need to reinstall grub, but grub-install tells me that Code:
could not find device for /dev/mapper/VolGroup00-LogVol00 I changed Ubuntu Live CD to CentOS 5.7 dvd in rescue mode, but it is doing the same thing. The reason for removing the logical volume in the VMware is to reduce the virtual disk space and remove the more complicated to manage (for me) logical volume. |
Try running grub-install from a chroot environment.
Code:
chroot /media/hd2 grub-install --recheck /dev/sda Code:
hd0 /dev/sda Code:
chroot /media/hd2 grub-install /dev/sda |
Yes, I forgot to mention that I did use
Code:
chroot /media/hd2 Code:
hd0 /dev/sda I think I got little further by binding also the sys directory Code:
mount --bind /sys /media/hd2/sys Code:
grep -v rootfs /proc/mounts > /etc/mtab Code:
df: cannot read table of mounted file systems |
All times are GMT -5. The time now is 12:55 AM. |