You don't need a second swap in there either.  If you are mounting all LFS
directories from 1 partition, you won't need the lvm and can delete and
create a 4th primary partition.

On Fri, Oct 9, 2015 at 4:26 PM, Bruce Dubbs <[email protected]> wrote:

> Will Senn wrote:
>
>> Hi,
>>
>> In transitioning from the virtualbox world to actual hardware, I have hit
>> a
>> snag and I am hoping y'all can help.
>>
>> I have followed the 7.8-rc1 book all the way up to installing grub. But,
>> when I try to install grub, it generates an error:
>>
>> root:/# grub-install /dev/sdb
>> Installing for i386-pc platform.
>> grub-install: error: disk `lvm/vg1-lfs--root' not found.
>>
>> My specific situation is that I am running on:
>> Dell Optiplex 755 with 2 physical drives:
>> /dev/sda (windows 8) a SATA III
>> /dev/sdb (debian 8) an SSD
>>
>> On the second drive, I have 4 partitions set up:
>> /dev/sdb1 /boot
>> /dev/sdb2 /
>> /dev/sdb3 Swap
>> /dev/sdb4 LVM
>>
>> The LVM set up is as follows:
>>
>> pvdisplay
>>    PV Name               /dev/sdb4
>>    VG Name               vg1
>>
>> lvdisplay
>>    LV Path                /dev/vg1/lfs-root
>>    LV Name                lfs-root
>>
>>    LV Path                /dev/vg1/lfs-swap
>>    LV Name                lfs-swap
>>
>> ls /dev/mapper/
>> control  vg1-lfs--root  vg1-lfs--swap
>>
>> In Jessie, /boot contained the grub boot stuff for jessie. In order to
>> allow LFS to manage the boot process, I moved the files into an _archive
>> folder.
>>
>> I then copied all of the $LFS/boot files into /boot.
>>
>> I entered the LFS chroot and ran:
>> grub-install /dev/sdb
>>
>> That's when I got the error. I figure that I can recover the debian grub
>> instance as a fallback, but I would rather give LFS control.
>>
>>
>> So, as a recap... /boot is on /dev/sdb1, the LFS chroot is on
>> /dev/vg1/lfs-root and the LFS swap is on /dev/vg1/lfs-swap. I would like
>> to
>> be able to boot the system using grub.
>>
>
> Why do you want your lfs root partition in a LVM container?  I suppose
> grub can handle that, but it makes things a lot more complicated.  Even in
> the above situation, Debian is not booting to a LVM partition.
>
> IIRC, you need a initrd to boot into a system with a root partition in LVM.
>
> I suggest tarring up the lfs partition and saving it on debian.  Dump the
> LVM and create /dev/sdb4 as a regular ext4 partition (You can reuse the
> swap partition on sdb3).  Then restore the saved LFS to sdb4 and mount it
> as /mnt/lfs.  Do a bind mount of /boot to /mnt/lfs/boot, remount the
> virtual partitions and enter chroot.  You should be able to follow the
> book, but you don't have to install grub.  Just edit the grub.cfg file and
> add a menuentry for LFS.
>
>   -- Bruce
>
>
> --
> http://lists.linuxfromscratch.org/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>
> Do not top post on this list.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> http://en.wikipedia.org/wiki/Posting_style
>
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to