Arch-Linux-install-script/btw-i-use-arch

33 lines
538 B
Plaintext
Raw Normal View History

2021-10-23 02:15:42 -04:00
#!/bin/sh
2021-11-02 11:57:01 -04:00
HOSTNAME="archlinux"
ROOT_PWD="linux"
2021-10-23 14:54:10 -04:00
sfdisk /dev/sda < partition_table;
2021-10-23 02:15:42 -04:00
2021-10-23 15:03:58 -04:00
mkfs.xfs -f /dev/sda1;
2021-10-23 02:15:42 -04:00
2021-10-23 14:54:10 -04:00
mount /dev/sda1 /mnt;
2021-10-23 02:15:42 -04:00
2021-10-23 14:54:10 -04:00
pacstrap /mnt base linux && genfstab /mnt > /mnt/etc/fstab;
2021-10-23 02:15:42 -04:00
2021-10-23 14:54:10 -04:00
arch-chroot /mnt;
2021-11-02 11:57:01 -04:00
echo $HOSTNAME > /etc/hostname;
echo "127.0.0.1 localhost
::1 localhost
127.0.1.1 $HOSTNAME" > /etc/hosts;
2021-11-02 12:44:08 -04:00
echo -en "$ROOT_PWD\n$ROOT_PWD" | passwd;
2021-11-02 11:57:01 -04:00
2021-11-02 12:30:04 -04:00
pacman -Sy --noconfirm grub networkmanager;
2021-10-23 14:54:10 -04:00
2021-11-02 11:36:20 -04:00
grub-install /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg;
2021-10-23 14:54:10 -04:00
2021-11-02 11:57:01 -04:00
systemctl enable --now NetworkManager.service;
2021-10-23 14:54:10 -04:00
exit;
reboot;