32 lines
525 B
Bash
32 lines
525 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 | passwd;
|
|
|
|
pacman -Sy --noconfirm grub networkmanager;
|
|
|
|
grub-install /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg;
|
|
|
|
systemctl enable --now NetworkManager.service;
|
|
|
|
exit;
|
|
|
|
reboot;
|