Start work on chroot part

master
kalle 2021-05-23 12:13:38 +02:00
parent a343996269
commit de4e97b5aa
1 changed files with 36 additions and 1 deletions

View File

@ -115,10 +115,45 @@ echo "[?] Go get a cup of thee or something."
sleep 5
# Use pacstrap to install all packages from the packages file.
pacstrap /mnt ${cat packages}
pacstrap /mnt `cat packages`
echo "[?] Package installation done. Generating /etc/fstab now."
# Generate fstab.
genfstab -U /mnt >> /mnt/etc/fstab
#
# Chroot part
#
echo "[?] Package installation is done. Please enter a couple bits of information about your system."
read time_zone -p "What timezone? [Europe/Amsterdam] "
read locale -p "What locale? [en_US.UTF-8] "
read hostname -p "What hostname? [arch] "
read cpu_vendor -p "What cpu vendor? [intel/amd]"
echo "[?] Starting work in chroot now."
echo "
ln -sf /usr/share/zoneinfo/$time_zone /etc/localtime
hwclock --systohc
echo \"$locale UTF-8\" > /etc/locale.gen
locale-gen
echo \"LANG=$locale\" > /etc/locale.conf
echo \"$hostname\" > /etc/hostname
echo \"127.0.0.1 localhost
::1 localhost
127.0.1.1 $hostname\" > /etc/hosts
echo \"[!] Please set your root password below\"
passwd
bootctl install
mkdir -p /etc/pacman.d/hooks/
echo \"[Trigger]
Type = Package
Operation = Upgrade
Target = systemd
[Action]
Description = Updating systemd-boot
When = PostTransaction
Exec = /usr/bin/bootctl update\" > /etc/pacman.d/hooks/100-systemd-boot.hook
pacman -Sy \"$cpu_vendor\"-ucode
" > arch-chroot /mnt