-
-
Save wongsyrone/7f25b17e9f007f6a258550e979cc02da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -sf /usr/share/zoneinfo/$(tzselect) /etc/localtime | |
hwclock --systohc | |
nano /etc/locale.gen && locale-gen | |
read -p "Default LANG is? [en_US,zh_CN...]" loc | |
echo "LANG=$loc.UTF-8" >> /etc/locale.conf | |
read -p "Hostname is?" hn | |
echo $hc > /etc/hostname | |
echo "127.0.1.1\t$hc.localdomain\t$hc" > /etc/hosts | |
#root pw | |
passwd | |
#network | |
#if wired | |
systemctl enable dhcpcd | |
#if wifi | |
# pacman -S networkmanager #this is for those who use gui | |
# pacman -S iw wpa_supplicant dialog && wifi-menu #cli use | |
#if pppoe -> write it yourself:) | |
#bootloader | |
#I think fine adjustment is necessacry for finding installation drive | |
IFS=" " read -ra TEST <<< $(lsblk|grep /boot) | |
part=$(${TEST[0]} | cut -c 7-9) | |
read -p "Are you using legacy or UEFI BIOS? [l,e]" bios | |
if [ $bios!='l' ] || [ $bios!='e' ]; then | |
exit -1 | |
elif [ $bios=='l']; then | |
pacman -S grub os-prober | |
grub-install /dev/$part | |
else | |
pacman -S dosfstools grub efibootmgr | |
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub | |
fi | |
grub-mkconfig -o /boot/grub/grub.cfg | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment