Arch-Linux-install-script/btw-i-use-arch
2021-11-02 12:44:08 -04:00

33 lines
538 B
Bash

#!/bin/sh
HOSTNAME="archlinux"
ROOT_PWD="linux"
sfdisk /dev/sda < partition_table;
mkfs.xfs -f /dev/sda1;
mount /dev/sda1 /mnt;
pacstrap /mnt base linux && genfstab /mnt > /mnt/etc/fstab;
arch-chroot /mnt;
echo $HOSTNAME > /etc/hostname;
echo "127.0.0.1 localhost
::1 localhost
127.0.1.1 $HOSTNAME" > /etc/hosts;
echo -en "$ROOT_PWD\n$ROOT_PWD" | passwd;
pacman -Sy --noconfirm grub networkmanager;
grub-install /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg;
systemctl enable --now NetworkManager.service;
exit;
reboot;