blob: 64a6b57b1fe99648ffe97ab88553b09db89e1f1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#install
sed -i '$a\sys-fs/lvm2 lvm' /etc/portage/package.use/custom # make sure work ...
emerge -av sys-fs/cryptsetup sys-kernel/dracut sys-fs/lvm2 sys-boot/efibootmgr sys-kernel/linux-firmware
vim /etc/dracut.conf
echo 'add_dracutmodules+=" crypt dm rootfs-block "' > /etc/dracut.conf
# add kernel_cmdline in /dec/dracut.conf
hostonly="yes"
early_microcode="yes"
# rd.luks.uuid should specify the UUID of the raw encrypted disk partition.
# root should specify the UUID of the opened / decrypted LUKS mapped device.
blkid
kernel_cmdline+="rd.luks.uuid=d53be821-e525-4f9d-a500-eafe439fb56a root=UUID=a59e88d6-f1e0-417a-8eb4-290151f28f67"
install_items="/lib64/elogind/elogind-uaccess-command"
rc-update add dmcrypt boot
rc-update add lvm2 boot
emerge gentoo-kernel-bin
eselect kernel set x
emerge @module-rebuild
cp /boot/vmlinuz-* /boot/efi/bootx64.efi
cp /boot/initramfs-* /boot/efi/initramfs.img
efibootmgr --create --disk /dev/nvme0n1 --part 1 -L "Gentoo" -l "\efi\bootx64.efi" --unicode "cryptdevice=UUID=d53be821-e525-4f9d-a500-eafe439fb56a root=UUID=a59e88d6-f1e0-417a-8eb4-290151f28f67 rw initrd=\efi\initramfs.img"
# for pc
efibootmgr --create --disk /dev/sda --part 1 -L "Gentoo" -l "\efi\boot\bootx64.efi" --unicode "root=UUID=c3f788c4-2ead-4f94-8d61-f5ea48627ab9 rw initrd=\efi\boot\initramfs.img"
|