help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with grub2 on lvm


From: Ingo Becker
Subject: problem with grub2 on lvm
Date: Thu, 04 Oct 2012 21:13:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120910 Thunderbird/15.0.1

Hi,

i am trying to create a bootable vm using grub2. Here are the steps i tried:

1. creating a logical volume using lvcreate
2. creating a partition-table with one ext partition inside the logical volume: #parted -s /dev/${VGNAME}/${LVNAME} unit GB mklabel msdos mkpart primary ext2 0 ${LVSIZE}
4. kpartx -a /dev/${VGNAME}/${LVNAME}

kpartx generates an extra device-node for the partition. I used this one to create a ext4 fs on it, mounted it and deboostraped a basic debian system to it. Here is where the problem starts. I don't know how to install grub2 to the lvm device-node from the host. As a host system i used archlinux. I tried a lot ways to get grub to work.
For example i created a device.map like this:
(hd0) /dev/mapper/vg-debianvm
(hd0,1) /dev/mapper/vg-debianvm1
and used it in combination with grub-install wich failed.

My question is, whats the right way to install grub2 to the lvm device? Or is there a way to install grub2 to a logical volume without a partition-table (/dev/vg/debianvm)? Do i have to chroot to the system to install grub or is there a way to install it from the host?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]