3 # install base system to target root partition
5 if ! mount | grep '/mnt'; then
10 pacman -Sy --noconfirm
14 KERNEL="$(iroot kernel)"
15 if [ "$KERNEL" = "default" ]; then
19 # fallback to linux-lts
24 if command -v pacstrap; then
25 while ! pacstrap /mnt base ${KERNEL} ${KERNEL}-headers linux-firmware reflector; do
26 dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
30 if command -v systemctl; then
31 while ! basestrap /mnt base ${KERNEL} ${KERNEL}-headers linux-firmware; do
32 dialog --msgbox "manjaro package installation failed \nplease reconnect to internet" 700 700
35 while ! basestrap /mnt runit elogind-runit base base-devel ${KERNEL} ${KERNEL}-headers linux-firmware; do
37 dialog --msgbox "artix package installation failed \nplease reconnect to internet" 700 700
42 if command -v genfstab; then
43 genfstab -U /mnt >>/mnt/etc/fstab
45 fstabgen -U /mnt >>/mnt/etc/fstab
50 cp -r ./instantARCH /mnt/root/instantARCH
52 cat /etc/pacman.d/mirrorlist
53 echo '# modified by instantARCH'
54 } >/mnt/etc/pacman.d/mirrorlist