-
Notifications
You must be signed in to change notification settings - Fork 1
/
arch_config.sh
executable file
·66 lines (64 loc) · 1.57 KB
/
arch_config.sh
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
##
## MidKnight PROJECT, 2019
## {MidKnight}projects
## File description:
## arch_config.sh
##
#!bin/bash
green='\e[0;32m'
red='\e[0;31m'
neutral='\e[0;m'
clear
echo -e "${red}[-------SETUP ARCHLINUX LVM-------]${neutral}"
localectl -setkeymap --no-convert fr
timedatectl set-ntp true
lsblk
echo -e "${green}DISK PARTITIONING${neutral}\n"
echo -e "${red}Enter the path you want to use.\n${neutral}"
read -p "Path (default /dev/sda): " input
if [ "$input" = "" ]
then
fdisk /dev/sda
else
fdisk $input
fi
if [ "$input" = "" ]
then
path="/dev/sda1"
else
path="${input}1"
fi
pvcreate $path
vgcreate vg1 $path
clear
echo -e "${green}CREATION OF LOGICAL VOLUMES\n${neutral}"
read -p "Enter the boot volume size: " size
lvcreate -L $size -n boot vg1
read -p "Enter the size of the root volume: " size
lvcreate -L $size -n root vg1
read -p "Enter the size of the home volume: " size
lvcreate -L $size -n home vg1
read -p "Enter the size of the swap volume: " size
lvcreate -L $size -n swap vg1
mkfs.ext2 /dev/vg1/boot
mkfs.ext4 /dev/vg1/root
mkfs.ext4 /dev/vg1/home
mkswap /dev/vg1/swap
swapon /dev/vg1/swap
mount /dev/vg1/root /mnt
mkdir /mnt/boot
mount /dev/vg1/boot /mnt/boot
mkdir /mnt/home
mount /dev/vg1/home /mnt/home
clear
echo -e "${red}BASIC SYSTEM INSTALLATION\n${neutral}"
sleep 6
mv ./mirrorlist /etc/pacman.d/mirrorlist
pacstrap /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
mv mkinitcpio.conf /mnt
mv arch_setup.sh /mnt/root
mv linux_config.sh /mnt
echo -e "${red}PLEASE LAUNCH linux_config.sh AFTER THE LAUNCH OF BASH\n${neutral}"
sleep 6
arch-chroot /mnt /bin/bash