-
Notifications
You must be signed in to change notification settings - Fork 0
/
postinstall.sh
34 lines (21 loc) · 886 Bytes
/
postinstall.sh
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
#!/usr/bin/env bash
set -e
sh pacstrap.sh
genfstab -L -p /mnt >> /mnt/etc/fstab
echo "KEYMAP=de" > /mnt/etc/vconsole.conf
echo "en_US.UTF-8 UTF-8" >> /mnt/etc/locale.gen
echo FONT=Lat2-Terminus16 >> /mnt/etc/vconsole.conf
arch-chroot /mnt /bin/bash locale-gen
echo LANGUAGE=en_US >> /mnt/etc/locale.conf
echo LC_ALL=C >> /mnt/etc/locale.conf
cp ./grub.conf /mnt/etc/default/grub
UUID=$(cryptsetup status /dev/mapper/archlinux | grep device)
UUID=$(echo ${UUID:9})
UUID=$(cryptsetup luksUUID "$UUID")
echo "GRUB_CMDLINE_LINUX=cryptdevice=UUID=$UUID:archlinux:allow-discards" >> /mnt/etc/default/grub
cp ./mkinitcpio.conf /mnt/etc/mkinitcpio.conf
arch-chroot /mnt grub-install --efi-directory=/boot --target=x86_64-efi --bootloader-id=boot
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
arch-chroot /mnt mkinitcpio -P
arch-chroot useradd -mG wheel brauni
echo "done!"