Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to partition for LVM2
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 20 Aug 2006
Posts: 478

PostPosted: Sat Sep 06, 2014 2:55 am    Post subject: how to partition for LVM2 Reply with quote

I am trying to install gentoo+LVM2 on a new Dell server but do not yet quite understand the new GPT partitioning schema. The machine has Dell Bios v1.2.2 and within the BIOS settings, I have a choice of boot mode, BIOS or UEFI. I've been confused on using GPT with which mode which is why I mention that.

I would like the following disk partitions:

It's been awhile since I've installed LVM2, but IIRC usr, var, opt, tmp, and home are all on a single LVM partition so all that requires one partition. And the way I think /boot and / work, it seems common practice not to LVM them. I'd like swap to be LVM because I will be upgrading the RAM one day.

I was hoping someone could suggest how this would look using gdisk and their partition types.

Thanks for any help.
Back to top
View user's profile Send private message

Joined: 05 Jul 2003
Posts: 44198
Location: 56N 3W

PostPosted: Sat Sep 06, 2014 9:35 am    Post subject: Reply with quote


Make a /boot and put everything else into LVM. With a separate /usr there is no advantage in having / outside the LVM as you need an initrd to mount /usr from inside the LVW anyway.
You can use BIOS or UEFI to boot - both work.

If you mix BIOS booting and GPT, there is one pitfall to be aware of.
BIOS does not understand GPT. When you make a GPT disk lable, you get a free protective MSDOS disk label too.
The BIOS will look here for a bootable flag, if one is required, so don't set it in your GPT partition table. Well, you can if you want to but the BIOS won't see it.

With BIOS, GPT and legacy grub there is another wrinkle to be aware of.
legacy grub installs some code before the first partition if it can. This space is occupied by the GPT partition table when GPT is in use. legacy grub knows this and reverts to using a block list to load stage2. Thats fine until you update legacy grub. If you update legacy grub, you must reinstall it to the MBR, so it rewrites the block list to point to the new stage2.

Personally, I use grub-static and turn off 32 bit support in the kernel, so its difficult to do this update.


Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message

Joined: 06 Mar 2007
Posts: 14390

PostPosted: Sat Sep 06, 2014 3:08 pm    Post subject: Reply with quote

For a current non-embedded storage device, you probably have enough free space that you could reserve today enough swap space for your eventual RAM upgrade, then avoid dealing with swap inside LVM. I concur with Neddy about putting root in LVM, and would go a step farther. Why have a separate /usr? I used to do that before the udev breakage that made initramfs-for-/usr mandatory, but when I looked back at my systems, I realized that I always mounted /usr with the same options as /, so there was no technical reason to keep them separate. I still like breaking out the other filesystems as you showed, though I sometimes omit /opt if I do not expect to install anything in it. On my Gentoo systems which install no proprietary programs, my /opt is empty.

I like syslinux as an alternative to grub2. It is not quite as flexible as grub2, but it is easy to configure, handles both GPT and MBR based boots, and uses a single directly-editable text file as its list of boot options, like grub1 did.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum