First draft of the installation script

This commit is contained in:
TuDatTr
2020-05-23 15:00:17 +02:00
parent e6ec25f60d
commit c6fd8e754f
7 changed files with 215 additions and 0 deletions

42
root/march-chroot.sh Normal file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
timezone="CHANGEME" # specified in ./arch-chroot.sh
locale="CHANGEME"
hostname="CHANGEME"
username="CHANGEME"
sudogrp="CHANGEME"
arch-chroot /mnt root/march-chroot.sh -t timezone -l locale -h hostname -u username -s sudogrp
ln -sf $timezone /etc/localtime
hwclock --systohc
echo $locale >> /etc/locale.gen
if [ $locale != "en_US.UTF-8 UTF-8"]; then
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
fi
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo $hostname > /etc/hostname
sed -i "s/^HOOKS=([[:alnum:][:space:]]\+)/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt filesystems fsck)/" /etc/mkinitcpio.conf
mkinitcpio -p linux
passwd
bootctl install
echo "timeout 3
default arch" > /boot/loader/loader.conf
echo "title ArchLinux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options rw cryptdevice=$(blkid $rootpart | cut -d" " -f2 | tr -d \"):cryptroot root=$cryptroot i8042.noloop i8042.nomux i8042.nopnp i8042.reset" > /boot/loader/entries/arch.conf
sed -i "s/"
systemctl enable march.service
systemctl enable dhcpcd.service