First draft of the installation script
This commit is contained in:
42
root/march-chroot.sh
Normal file
42
root/march-chroot.sh
Normal 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
|
||||
Reference in New Issue
Block a user