add some utils and pass vars to in-root.sh

This commit is contained in:
Mats van Reenen 2022-09-10 19:39:36 +02:00 committed by GitHub
parent da3b7a7bdd
commit 3e11d66b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,7 @@
HOSTNAME="CoolhavenPC"
DISK="/dev/sda"
function run(){ function run(){
echo "[ ] $1" echo "[ ] $1"
echo "# $1" >>install.log echo "# $1" >>install.log
@ -21,7 +24,6 @@ echo "" >install.log
# ENDEV=enp1s1 # ENDEV=enp1s1
# IP=1.2.3.4/24 # IP=1.2.3.4/24
# GATEWAY=1.2.3.1 # GATEWAY=1.2.3.1
HOSTNAME="CoolhavenPC"
# ip addr add $IP dev $ENDEV # ip addr add $IP dev $ENDEV
# ip route add default via $GATEWAY dev $ENDEV # ip route add default via $GATEWAY dev $ENDEV
@ -45,8 +47,6 @@ echo
echo === setup partitions echo === setup partitions
DISK="/dev/sda"
# fdisk $DISK # fdisk $DISK
# g # g
# n # boot partition # n # boot partition
@ -110,8 +110,8 @@ echo
echo === install arch echo === install arch
echo echo
run "install base of arch" "pacstrap /mnt base linux linux-firmware" run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr"
run "intall utitlities" "pacstrap /mnt btrfs-progs" run "intall utitlities" "pacstrap /mnt btrfs-progs man vim"
echo "generate fstab" echo "generate fstab"
genfstab -U /mnt >>/mnt/etc/fstab genfstab -U /mnt >>/mnt/etc/fstab
@ -121,4 +121,4 @@ echo
echo === chroot config echo === chroot config
echo echo
arch-chroot /mnt bash /root/in-root.sh arch-chroot /mnt bash /root/in-root.sh "$HOSTNAME" "$DISK"