more fixes

This commit is contained in:
2023-11-28 17:40:57 +01:00
parent 68641534a6
commit efd87a58bd
2 changed files with 20 additions and 9 deletions

View File

@@ -1,15 +1,17 @@
# This file will be executed automatically once in chroot # This file will be executed automatically once in chroot
# Set time zone
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
cp /root/arch-dev-vm/locale.gen /etc/locale.gen
hwclock --systohc
driveName=cat /root/arch-dev-vm/drive driveName=cat /root/arch-dev-vm/drive
hwclock --systohc
# Generate locales
cp /root/arch-dev-vm/locale.gen /etc/locale.gen
locale-gen locale-gen
# Configure locale, kb layout & hostname
echo "LANG=en_GB.UTF-8" > /etc/locale.conf echo "LANG=en_GB.UTF-8" > /etc/locale.conf
echo "KEYMAP=de_CH-latin1" > /etc/vconsole.conf echo "KEYMAP=de_CH-latin1" > /etc/vconsole.conf
echo "arch-dev-vm" > /etc/hostname echo "arch-dev-vm" > /etc/hostname
@@ -22,14 +24,15 @@ echo "
sleep 2 sleep 2
# mkinitcpio -P # Copy mkinitcpio config over to enable plymouth
plymouth-set-default-theme -R script # cp /root/arch-dev-vm/mkinitcpio.conf /etc/mkinitcpio.conf
# TODO: plymouth-set-default-theme -R script
# Test boot mode (if efi or csm) # Test boot mode (if efi or csm)
bootMode=cat /sys/firmware/efi/fw_platform_size bootMode=cat /sys/firmware/efi/fw_platform_size
if ["$bootMode" == '64' ]; then # Install grub (bootloader)
if [["$bootMode" == '64' ]]; then
echo " echo "
==> Detected EFI boot mode. Setting up accordingly. ==> Detected EFI boot mode. Setting up accordingly.
@@ -61,6 +64,7 @@ echo "
read -p "Choose a password: " pwd read -p "Choose a password: " pwd
# Create users
useradd -m arch-is-best useradd -m arch-is-best
passwd arch-is-best << EOD passwd arch-is-best << EOD
${pwd} ${pwd}
@@ -86,8 +90,8 @@ to finish up setup
" "
# Head into userland with userland.sh script
chmod 777 /home/arch-is-best/arch-dev-vm/vscode-extensions chmod 777 /home/arch-is-best/arch-dev-vm/vscode-extensions
su arch-is-best -c /home/arch-is-best/arch-dev-vm/userland.sh su arch-is-best -c /home/arch-is-best/arch-dev-vm/userland.sh

View File

@@ -16,6 +16,8 @@ for you.
This script doesn't check for EFI compatibility yet This script doesn't check for EFI compatibility yet
" "
# List all drives connected
lsblk lsblk
echo " echo "
@@ -47,12 +49,14 @@ echo "
" "
sleep 2 sleep 2
# Unmount and wipe selected drive
umount -R /mnt umount -R /mnt
wipefs -a "/dev/$driveName" wipefs -a "/dev/$driveName"
sleep 2 sleep 2
# Format disk using fstab
echo -e " echo -e "
g g
n n
@@ -79,6 +83,7 @@ echo "
" "
# Format & sync time
timedatectl timedatectl
echo "y\n" | mkfs.ext4 "/dev/${driveName}3" echo "y\n" | mkfs.ext4 "/dev/${driveName}3"
@@ -87,6 +92,8 @@ mount "/dev/${driveName}3" /mnt
mkdir /mnt/boot mkdir /mnt/boot
mount "/dev/${driveName}2" /mnt/boot mount "/dev/${driveName}2" /mnt/boot
# Install packages
pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootmgr grub man git xfce4 base-devel fish sudo gdm plymouth neovim --noconfirm pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootmgr grub man git xfce4 base-devel fish sudo gdm plymouth neovim --noconfirm