Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

Confusion regarding debian-sources kernel and using LVM


xsilentmurmurx

Question

Hello everyone

 

This is my first time posting in the forums.  I am currently trying to install Funtoo on my desktop computer with UEFI/GPT and LVM.  As I am reading the documentation, I am running into some instructions which seem vague to me:

 

1) In the official installation guide, it mentions that if you already have a version of debian-sources installed, you can skip the kernel section and go to the bootloader section.  This section does not mention anything about if you are using LVMs

2) In the following documentation:   https://www.funtoo.org/LVM_Install_Guide

It mentions that after using genkernel to build the initramfs, we will still need to build the kernel to be able to use LVM.  How do I build the kernel itself? 

3) In the official instruction guide, in the section about partitioning the disk using the new school method of UEFI/GPT,  it explains how to create the EFI Boot partition, the Swap partition and the root partition.  From what I understand about UEFI/GPT, a small Bios Boot partition is required to be able to boot.  Was this step left out of the instructions?  I see it on this documentation: https://www.funtoo.org/Partitioning_using_gdisk

 

What's confusing to me is that the official installation guide is more recently updated than the other two articles.  Which do I follow to be able to successfully boot my system after I am done installing it? 

 

 

Thanks for all help and happy new year!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

for the 2) case, the debian-sources is compiled with initramfs which is created with LVM support by default. So, what you do is just unpack the stage into the volume that holds "/", use correct boot.conf, emerge lvm2 and add it's init script to boot runlevel. For the UEFI you just need additional partition formatted with FAT32. The LVM_Install does not cover this and this bit needs addition, but is as plain simple as having a separate partition with FAT32, rest of partition can be the LVM layout.

Link to comment
Share on other sites

  • 0
21 minutes ago, Oleg Vinichenko said:

for the 2) case, the debian-sources is compiled with initramfs which is created with LVM support by default. So, what you do is just unpack the stage into the volume that holds "/", use correct boot.conf, emerge lvm2 and add it's init script to boot runlevel. For the UEFI you just need additional partition formatted with FAT32. The LVM_Install does not cover this and this bit needs addition, but is as plain simple as having a separate partition with FAT32, rest of partition can be the LVM layout.

Thank you for the response!  So to add the init script to boot runlevel , I guess I will have to do rc-update add lvm boot

Do I have to emerge grub with the device-mapper USE flag? I know in Gentoo we would have to do that.    Also do I have to add "dolvm" to my Grub commandline defaults in the Grub configuration?

As for the UEFI partition, I currently have:

/dev/sda1  as a 500MB EFI Partition formatted as FAT32

/dev/sda2 swap partition

/dev/sda3 root partition as an LVM

 

Would that be enough or would I have to add a 32MB  Bios Boot partition as well? 

You mentioned using the correct boot.conf.. Where do I get information about what the correct boot.conf should look like for LVM?

 

Thanks!

 

 

Link to comment
Share on other sites

  • 0
32 minutes ago, Oleg Vinichenko said:

no need for additional 32Mb Bios Boot partition.

LVM install guide has the examples for fstab and boot-update's boot.conf. You need to change /boot to be vfat instead ext2


LABEL=boot                      /boot               vfat        noatime     0           0

Thank you for the response. Will I need to add  defaults,noatime  to the /etc/fstab entry for /boot?  or will the example you provided be enough for a successful boot?

 

 

Thanks

Link to comment
Share on other sites

  • 0
13 hours ago, Oleg Vinichenko said:

no need for additional 32Mb Bios Boot partition.

LVM install guide has the examples for fstab and boot-update's boot.conf. You need to change /boot to be vfat instead ext2


LABEL=boot                      /boot               vfat        noatime     0           0

 

Thanks! that worked.. I noticed that when I added LVM to runlevel boot using rc-update add lvm boot , afterwards when I rebooted the system into thefirst boot I received an error message saying that the LVM script is using runscripts and it needs to be converted to openrc-run.  I saw the same when I tried to boot the system after adding net.enp2s0  to runlevel default using rc-update add net.enp2s0 default. How does one convert the scripts to openrc-run? 

Link to comment
Share on other sites

  • 0

hi, openrc devs seem to think it was good idea to change names of interpreter , who knows , im sure answers are out there.

if you look in /etc/init.d/ open a file and look at the top line..  change runscript to openrc-run .

but honestly users should not be forced into this stuff IMO.

run this and you will see a list of the files needing updated..

grep '^#!/sbin/runscript' /etc/init.d/*

also could be fixed with sed in one go but possible break stuff like that.

 

ps. just thought about situations where users would have to fix this some installed packages will install run-scripts in there

but its really simple enough to fix.

Link to comment
Share on other sites

  • 0
On 12/31/2017 at 3:01 PM, Oleg Vinichenko said:

ideally the init scripts need migrated. but in reality it should not cause problem. Actually, there is new LVM  you can test. 2.02.173, without keywords.

how would I emerge the new LVM version with out keywords?  Would I just unmask it and place it in the /etc/portage/package.unmask file and emerge lvm2?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...