Last active
August 29, 2015 14:03
-
-
Save lancechentw/5e22bdce8515310f805c to your computer and use it in GitHub Desktop.
Arch Linux One Step Installer
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
echo "nameserver 140.113.235.1" > /etc/resolv.conf | |
echo "nameserver 140.113.235.1" > /etc/resolv.conf.head | |
sgdisk -l flex-partition-table /dev/sda | |
sgdisk -G /dev/sda | |
mkfs.ext2 /dev/sda1 | |
mkfs.ext4 /dev/sda3 | |
mkswap /dev/sda2 | |
swapon /dev/sda2 | |
mount /dev/sda3 /mnt | |
mkdir /mnt/boot | |
mount /dev/sda1 /mnt/boot | |
sed -i '1 iServer = http://archlinux.cs.nctu.edu.tw/$repo/os/$arch' /etc/pacman.d/mirrorlist | |
pacman -Sy --noconfirm archlinux-keyring | |
pacstrap /mnt base base-devel | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
cp setup.sh /mnt/root/setup.sh | |
arch-chroot /mnt /root/setup.sh | |
rm /mnt/root/setup.sh | |
umount -R /mnt | |
swapoff /dev/sda2 |
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
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen | |
locale-gen | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime | |
hwclock --systohc --utc | |
mkinitcpio -p linux | |
pacman -S --noconfirm grub | |
grub-install --target=i386-pc --recheck /dev/sda | |
grub-mkconfig -o /boot/grub/grub.cfg | |
pacman -S --noconfirm openssh | |
systemctl enable sshd | |
pacman -S --noconfirm ntp | |
ntpdate tick.stdtime.gov.tw | |
systemctl enable ntpd | |
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment