arch-maride-flavour/steps/50-configure.step

38 lines
1.3 KiB
Plaintext
Raw Normal View History

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-12 14:01:00 +00:00
echo "~> Configuring 'grub' for $bootloader"
if [ "$bootloader" == "EFI" ]; then
arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch_GRUB
else
arch-chroot /mnt grub-install --target=i386-pc /dev/*da
fi
2017-08-05 22:28:13 +00:00
echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub
2017-08-04 11:36:06 +00:00
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
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
amf_return=0