From 000338106a111dc12cec7c07f64e5b541eed5dae Mon Sep 17 00:00:00 2001 From: fithwum <34775371+fithwum@users.noreply.github.com> Date: Mon, 31 Dec 2018 13:03:17 -0800 Subject: [PATCH] Update test.sh --- test.sh | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index 9e7f637..9a021b6 100644 --- a/test.sh +++ b/test.sh @@ -1,8 +1,30 @@ #!/bin/bash # Copyright (c) 2018 fithwum # All rights reserved - - +# Setup the target partition for install mkfs.ext4 -L Debian /dev/sda1 -host# mkdir /mnt/deboot -mount -t ext4 /dev/sda1 /mnt/deboot \ No newline at end of file +mkdir /mnt/deboot +mount -t ext4 /dev/sda1 /mnt/deboot +# Installing the base system with network access +debootstrap --include linux-image-amd64,grub-pc,locales --arch amd64 unstable /mnt/deboot http://ftp.us.debian.org/debian +# Preparing the chroot environment +cp /etc/mtab /mnt/deboot/etc/mtab +mount -o bind /dev /mnt/deboot/dev +mount -o bind /proc /mnt/deboot/proc +mount -o bind /sys /mnt/deboot/sys +# Continuing the installation within chroot +chroot /mnt/deboot /bin/bash +grub-install /dev/sda +update-grub +blkid /dev/sda1 +UUID=79168060-9d9c-4cf6-8ee9-bb846aee589b / ext4 defaults,errors=remount-ro 0 1 +echo "debian" > /etc/hostname +dpkg-reconfigure locales +passwd +adduser user +# Setting up the network (eth0) +dhclient -v eth0 +# Finishing the install +apt-get clean +update-initramfs -u -k all +exit \ No newline at end of file