Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install (systemd, lvm, luks)
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
karcio
n00b
n00b


Joined: 18 Sep 2024
Posts: 1

PostPosted: Wed Sep 18, 2024 2:13 pm    Post subject: Install (systemd, lvm, luks) Reply with quote

Hi, guys

I am thinking to give it try gentoo, I am reading wiki, asking questions on irc but I need to think about it and learn more about that distro. I can easily do the same on arch but here I have some issues. I can see some tutorials but those are old and some packages not there - and this is blocking my progress.

Could you please give me some advice how where should I start? I am trying following wiki but ... what components use for LVM/LUKS - how to activate them during start.

I want to have 2 partitions
- sda1 /boot ext4
- sda2 / LUKS -> root + swap
- grub
- systemd
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3912

PostPosted: Thu Sep 19, 2024 9:24 am    Post subject: Reply with quote

Welcome to Gentoo Forums!

First download a live desktop like ubuntu.
Put it into a usb.
Boot into it.
Then Download the systemd tarball
https://distfiles.gentoo.org/releases/amd64/autobuilds/20240915T163400Z/stage3-amd64-systemd-20240915T163400Z.tar.xz
create two partitions.
One ESP and another one to be formatted as luks.
Open luks partition and then
mount both under /mnt. Chroot into you system and proceed as shown in the handbook.
You need to have
Code:

sys-fs/cryptsetup

and a grub line like
Code:

GRUB_CMDLINE_LINUX="cryptdevice=<UUID of luks patition>:<name of decrypted volume> root=/dev/mapper/<name of decrypted volume>"


You need to install
Code:

sys-kernel/dracut

to create an initramfs
and also create an entry of the luks partition in
/etc/crypttab.
Quote:

- sda2 / LUKS -> root + swap

If you want also swap inside sda2 then you need to create lvm on top of luks and create two logical volumes one for root and one for swap.
Your proposed layout will be like
Code:

/devsda1      /boot
/dev/sda2     #luks partition
    |
    /dev/mapper/<luks?>  /

Or
Code:

/devsda1      /boot
/dev/sda2     #luks partition
    |
    /dev/mapper/<luks?> 
         |
         /dev/vg/root       /
         /dev/vg/swap     #as swap

A better layout with three partitions
Code:

/devsda1      /efi  or /boot/efi
/dev/sda2     /boot
/dev/sda3     #luks partition
    |
    /dev/mapper/<luks?> 
         |
         /dev/vg/root       /
         /dev/vg/swap     #as swap

_________________
:)
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