Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-26-2012, 12:41 AM   #1
LQ Newbie
Registered: Mar 2011
Location: Houston, TX
Posts: 2

Rep: Reputation: 0
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:
mount /dev/sda2 /media/hd1
mount /dev/sda1 /media/hd1/boot
mount /dev/sdb1 /media/hd2
I copied all files from hd1 to hd2 using:
cp -avf /media/hd1/* /media/hd2
Next I connected the dev and proc directories to the new partition:
mount --bind /dev /media/hd2/dev
mount --bind /proc /media/hd2/proc
I run
grub-install --recheck /dev/sdb
but it gives me an error.

At this point I thought it should be almost done, I just need to reinstall grub, but grub-install tells me that
could not find device for /dev/mapper/VolGroup00-LogVol00
could not find device for /dev/mapper/VolGroup00-LogVol00
could not find device for /dev/mapper/VolGroup00-LogVol00
/dev/mapper/VolGroup00-LogVol00: Not found or not a block device.
What am I doing wrong?

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.
Old 01-26-2012, 10:31 PM   #2
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 598

Rep: Reputation: 120Reputation: 120
Try running grub-install from a chroot environment.
chroot /media/hd2 grub-install --recheck /dev/sda
If you still get the error, edit /media/hd2/boot/grub/
hd0  /dev/sda
and run grub-install from the chroot environment:
chroot /media/hd2 grub-install /dev/sda
Hope it helps.
Old 01-27-2012, 09:11 PM   #3
LQ Newbie
Registered: Mar 2011
Location: Houston, TX
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, I forgot to mention that I did use
chroot /media/hd2
I checked the and I made sure that it contains the entry
hd0  /dev/sda
but still I get the same error.

I think I got little further by binding also the sys directory
mount --bind /sys /media/hd2/sys
I rebuild the mtab file using
grep -v rootfs /proc/mounts > /etc/mtab
Now, grub-install gives me:
df: cannot read table of mounted file systems
Thanks though, I am going to restart from scratch since I have the original VMware drive.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
move VolGroup-lv-home to VolGroup-lv-root dmb2002man Linux - Newbie 11 08-19-2011 09:22 AM
[SOLVED] cannot install grub (grub-probe says 'unknown fs' with ext4 and md raid) cusco Linux - Software 3 03-15-2011 02:58 AM
[SOLVED] Grub can't find grub.cfg when booting - error: no such device Breagha Linux - Software 8 03-14-2010 01:40 PM
RHEL 5 LSI megasr SAS RAID does not find VolGroup after install thetawave84 Linux - Newbie 1 01-17-2008 04:12 AM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 04:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration