updates: add main steps

This commit is contained in:
2024-03-30 02:24:50 -04:00
parent 5ff5417993
commit 3f5aa6064b
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#! /bin/env bash
# assume that /mnt and /mnt/boot is mounted
TARGET=/mnt
debootstrap stable $TARGET http://deb.debian.org/debian/
genfstab -U $TARGET >>/mnt/etc/fstab
mount -t proc /proc $TARGET/proc
mount -t sysfs /sys $TARGET/sys
mount --bind /dev $TARGET/dev
mount -t devpts /dev/pts $TARGET/dev/pts
mount --bind /sys/firmware/efi/efivars $TARGET/sys/firmware/efi/efivars
echo "deb http://deb.debian.org/debian stable main non-free-firmware" >$TARGET/etc/apt/sources.list
echo "export PATH=$PATH:/sbin/" >>$TARGET/root/.bashrc
cp ./chroot-commands.sh $TARGET/root/
chmod +x $TARGET/root/chroot-commands.sh
chroot $TARGET /root/chroot-commands.sh
echo "Done! Should be good to reboot now and run post-install scripts."