aboutsummaryrefslogtreecommitdiff
path: root/src/install.sh
blob: c9cddd0a3bea8a6aba50cea22bac77846cb13530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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