Installing Arch Linux on VMWare
Appearance
Legacy
[edit]#!/bin/bash
# This assumes you want the following partitions setup:
# /dev/sda1 -> /boot
# /dev/sda2 -> Swap
# /dev/sda3 -> /
read -p "This will wipe /dev/sda1-3, press enter to continue"
mkfs.ext2 /dev/sda1
mkswap /dev/sda2
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt
mkdir /mnt/boot && mount /dev/sda1 /mnt/boot
swapon /dev/sda2
clear
read -p "Press Enter to install System"
pacstrap /mnt base{,-devel}
pacstrap /mnt grub-bios os-prober open-vm-tools
pacstrap /mnt xf86-input-vmmouse xf86-video-vmware mesa xorg
pacstrap /mnt bspwm sxhd networkmanager nm-connection-editor
pacstrap /mnt xfce4 xfce4-goodies slim networkmanager nm-connection-editor
clear
# This configures en_US for your locale
# Hostname, Keymap to US, your fstab
read -p "Configuring your system"
echo "en_US.UTF-8 UTF-8" > /mnt/etc/locale.gen
clear
echo "Please set your hostname"
read hostname
echo "$hostname" > /mnt/etc/hostname
genfstab -U -p /mnt >> /mnt/etc/fstab
clear
# This creates an install script in the root of the new install
# Then chroots in, runs the last little bit to configure and initialize the system
read -p "Now for chroot fun!"
echo "#!/bin/bash" > /mnt/install.sh
echo "ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime" >> /mnt/install.sh
echo "locale-gen" >> /mnt/install.sh
echo "export LANG=en_US.UTF-8" >> /mnt/install.sh
echo "hwclock --systohc --utc" >> /mnt/install.sh
echo "echo 'Change Root Password!'" >> /mnt/install.sh
echo "passwd" >> /mnt/install.sh
echo "mkinitcpio -p linux" >> /mnt/install.sh
echo "grub-mkconfig -o /boot/grub/grub.cfg" >> /mnt/install.sh
echo "grub-install --recheck /dev/sda" >> /mnt/install.sh
echo "useradd yawg" >> /mnt/install.sh
echo "mkdir /home/yawg" >> /mnt/install.sh
echo "gpasswd -a yawg wheel" >> /mnt/install.sh
echo "echo 'sxhkd &' > /home/yawg/.xinitrc" >> /mnt/install.sh
echo "echo 'exec bspwm' > /home/yawg/.xinitrc" >> /mnt/install.sh
echo "chown -R yawg /home/yawg" >> /mnt/install.sh
echo "echo 'User Password'" >> /mnt/install.sh
echo "passwd yawg" >> /mnt/install.sh
echo "systemctl enable vmware-vmblock-fuse" >> /mnt/install.sh
echo "systemctl enable NetworkManager" >> /mnt/install.sh
echo "systemctl enable slim" >> /mnt/install.sh
chmod +x /mnt/install.sh
arch-chroot /mnt ./install.sh
read -p "Should be good to go!"
rm -rf /mnt/install.sh
umount /mnt/boot
umount /mnt
# ip link
# systemctl enable dhcpcd@eth0.service