2017-07-30 23:07:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "~> generating fstab"
|
|
|
|
genfstab -U /mnt >> /mnt/etc/fstab
|
|
|
|
|
|
|
|
echo "~> Choosing 'Europe/Berlin' as timezone and syncing hardware clock"
|
2017-08-04 11:36:06 +00:00
|
|
|
arch-chroot /mnt ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
|
|
|
arch-chroot /mnt hwclock --systohc
|
2017-07-30 23:07:54 +00:00
|
|
|
|
|
|
|
echo "~> Overwriting locale.gen and generate en_US and de_DE"
|
2017-08-05 21:22:05 +00:00
|
|
|
echo -e 'en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8' > /mnt/etc/locale.gen
|
2017-08-04 11:36:06 +00:00
|
|
|
arch-chroot /mnt locale-gen
|
2017-08-05 21:22:05 +00:00
|
|
|
echo 'LANG=de_DE.UTF-8' > /mnt/etc/locale.conf
|
|
|
|
echo 'KEYMAP=de-latin1' > /mnt/etc/vconsole.conf
|
2017-07-30 23:07:54 +00:00
|
|
|
|
|
|
|
echo -e "~> Choose a hostname: "
|
|
|
|
read hostname
|
2017-08-05 21:22:05 +00:00
|
|
|
echo $hostname > /mnt/etc/hostname
|
2017-08-03 15:53:31 +00:00
|
|
|
|
2017-08-12 14:01:00 +00:00
|
|
|
echo "~> Configuring 'grub' for $bootloader"
|
2018-03-03 19:08:49 +00:00
|
|
|
if [ "$bootmethod" == "EFI" ]; then
|
2017-09-02 14:44:32 +00:00
|
|
|
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=BOOT
|
|
|
|
# thanks to Virtualbox, this step is necessary
|
2017-09-02 23:37:21 +00:00
|
|
|
cp /mnt/boot/EFI/BOOT/{grubx64.efi,BOOTX64.EFI}
|
2017-08-12 14:01:00 +00:00
|
|
|
else
|
|
|
|
arch-chroot /mnt grub-install --target=i386-pc /dev/*da
|
|
|
|
fi
|
|
|
|
|
2018-03-04 13:00:22 +00:00
|
|
|
if [ "$cryptroot" -eq 1 ]; then
|
2017-09-13 13:24:52 +00:00
|
|
|
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
|
|
|
|
fi
|
|
|
|
|
2017-08-04 11:36:06 +00:00
|
|
|
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
|
2017-08-05 21:58:37 +00:00
|
|
|
|
|
|
|
echo "~> Patching mkinitcpio.conf for encryption magic"
|
|
|
|
arch-chroot /mnt sed -i "s/^HOOKS/#HOOKS/g" /etc/mkinitcpio.conf
|
|
|
|
echo "HOOKS=\"base udev autodetect modconf block keyboard keymap encrypt filesystems fsck\"" >> /mnt/etc/mkinitcpio.conf
|
|
|
|
|
|
|
|
echo "~> ... and recompile the kernel"
|
|
|
|
arch-chroot /mnt mkinitcpio -p linux
|
2017-09-02 13:07:59 +00:00
|
|
|
|
2017-09-26 15:12:32 +00:00
|
|
|
echo "~> Patching pacman.conf for some pacman magic."
|
2017-10-02 15:08:11 +00:00
|
|
|
arch-chroot /mnt sed -i "s/\[options\]/\[options\]\nILoveCandy/g" /etc/pacman.conf
|
2017-09-26 15:12:32 +00:00
|
|
|
|
2017-09-02 13:07:59 +00:00
|
|
|
amf_return=0
|