Create three partitions with gdisk
:
- 512 MB EFI System Partition (ESP) of type EF00
- 512 MB partition 8300 (Linux filesystem) for
/boot
- rest for partition 8304 Linux x86-64 root (/) (https://systemd.io/DISCOVERABLE_PARTITIONS/)
Maybe use boot loader partition:
Command (? for help): t
Partition number (1-3): 2
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): bc13c2ff-59e6-4262-a352-b275fd6f7172
Changed type of partition to 'Freedesktop $BOOT'
Format partitions:
$ sudo mkfs.fat -F32 -nESP /dev/nvme0n1p1
mkfs.fat 4.1 (2017-01-24)
$ sudo mkfs.ext4 -L boot /dev/nvme0n1p2
[…]
$ sudo cryptsetup luksFormat /dev/nvme0n1p3
$ sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt
Check file config
, and update hostname and root password.
Install Debian sid/unstable with the command below:
DEBOOTSTRAP=mmdebstrap sudo grml-debootstrap -c config --efi /dev/nvme0n1p2 --chroot-scripts chroot-scripts --packages packages
Mount system and enter with chroot:
$ sudo mount /dev/nvme0n1p3_crypt /mnt
$ sudo mount /dev/nvme0n1p2 /mnt/boot
$ sudo mkdir /mnt/boot/efi
$ sudo mount /dev/nvme0n1p1 /mnt/boot/efi
$ sudo grml-chroot /mnt bash
Edit /etc/fstab
to add the boot partition.
Edit /etc/crypttab
to add the root partition:
sda3_crypt UUID=<in lsblk -O> none luks
Update initrd and install GRUB:
$ sudo update-initramfs -c -k all
$ sudo grub-install
$ sudo update-grub