aboutsummaryrefslogtreecommitdiff
path: root/src/install.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/install.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/install.sh b/src/install.sh
new file mode 100755
index 0000000..c9cddd0
--- /dev/null
+++ b/src/install.sh
@@ -0,0 +1,68 @@
+#/bin/sh
+
+loadkeys fr
+pacman-key --refresh-keys
+pacman --noconfirm -Syu
+pacman --noconfirm -S vim tmux
+
+echo "::============================================================================::"
+echo "Creation of the new MBR/msdos partition table"
+echo "::============================================================================::"
+
+parted -s /dev/sda mklabel msdos
+
+echo "::============================================================================::"
+echo "Creation of the / parition"
+echo "::============================================================================::"
+
+parted -s /dev/sda mkpart primary ext4 1MiB 30GiB
+parted -s /dev/sda set 1 boot on
+
+echo "::============================================================================::"
+echo "Creation of the /home partition"
+echo "::============================================================================::"
+
+parted -s /dev/sda mkpart primary ext4 30GiB 100%
+
+echo "::============================================================================::"
+echo "Creation of the filesystems"
+echo "::============================================================================::"
+
+mkfs.ext4 -F /dev/sda1
+mkfs.ext4 -F /dev/sda2
+
+echo "::============================================================================::"
+echo "mounting partitions"
+echo "::============================================================================::"
+
+mount /dev/sda1 /mnt
+mkdir -p /mnt/home
+mount /dev/sda2 /mnt/home
+
+echo "::============================================================================::"
+echo "Install new system"
+echo "::============================================================================::"
+pacstrap /mnt base base-devel
+
+echo "::============================================================================::"
+echo "Generation of an fstab"
+echo "::============================================================================::"
+
+genfstab -U -p /mnt >> /mnt/etc/fstab
+mv /root/chroot-install.sh /mnt/chroot-install.sh
+#chmod +x /mnt/chroot-install.sh
+
+echo "::============================================================================::"
+echo "Enter in chroot mode"
+echo "::============================================================================::"
+
+arch-chroot /mnt /chroot-install.sh
+echo "Done!"
+
+echo "::============================================================================::"
+echo "Unmounting all partition and reboot !"
+echo "::============================================================================::"
+
+sync
+umount −R /mnt
+reboot