aboutsummaryrefslogtreecommitdiff
path: root/src/install.sh
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2018-02-21 01:19:28 +0100
committerNeodarZ <neodarz@neodarz.net>2018-02-21 01:19:28 +0100
commit59e2ac74bd0c28d3c96f7f53ce09fc2c37b6e8af (patch)
tree697031d7f0f1ecfe377fc100c4f85c12b4554780 /src/install.sh
downloadarchlinux_autoinstall-59e2ac74bd0c28d3c96f7f53ce09fc2c37b6e8af.tar.xz
archlinux_autoinstall-59e2ac74bd0c28d3c96f7f53ce09fc2c37b6e8af.zip
Initial commit
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