Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
Boot into a live system, and make sure grml-debootstrap is installed. For example, write the [grml](https://grml.org/daily/) ISO, for example [daily snapshot](https://grml.org/daily/) to a USB storage device.
sudo dd if=grml64-full_sid_latest.iso of=/dev/sdb bs=4194304 conv=sync
Create three partitions with `gdisk`:
1. 1 GB EFI System Partition (ESP) of type EF00
2. 1 GB partition 8300 (Linux filesystem) for `/boot`
3. rest for partition 8304 Linux x86-64 root (/) (https://systemd.io/DISCOVERABLE_PARTITIONS/)
4. 8 GB swap partition
Maybe use [boot loader partition](https://systemd.io/BOOT_LOADER_SPECIFICATION/):
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'
Do not forget to run `partprobe` to notify the Linux kernel about the partition table change.
Or, with sgdisk:
sudo sgdisk --zap --new=1:0:+1G /dev/nvme0n1 -t 0:ef00 --new=2:0:+1G -t 0:8300 --new=3:0:-8G -t 0:8304 --new=4:0:0 -t 0:8200 -p
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
Clone repository:
$ git clone https://github.molgen.mpg.de/pmenzel/grml-debootstrap-config
$ cd grml-debootstrap-config
Check file `config`, and update hostname and root password. Update the user details in `chroot-scripts/20-add-user.sh`.
Install Debian sid/unstable with the command below:
DEBOOTSTRAP=mmdebstrap sudo grml-debootstrap -c config --efi /dev/nvme0n1p1 --chroot-scripts chroot-scripts --packages packages
Mount system and enter with chroot:
$ sudo mount /dev/mapper/nvme0n1p3_crypt /mnt
Move files from `/mnt/boot` to /dev/nvme0n1p2:
$ sudo mount /dev/nvme0n1p2 /mnt/tmp
$ sudo mv /mnt/boot/* /mnt/tmp
$ sudo umount /mnt/tmp
$ 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.
/dev/nvme0n1p2 /boot auto defaults,errors=remount-ro 0 1
Edit `/etc/crypttab` to add the root partition:
nvme0n1p3_crypt UUID=<in lsblk -O> none luks
Update initrd and install GRUB:
$ sudo update-initramfs -c -k all
$ sudo grub-install
$ sudo update-grub