mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-14 04:07:18 +00:00
Update installation guide,script,hosts file
This commit is contained in:
parent
74b3df693c
commit
1cb455fba7
|
@ -17,45 +17,32 @@ Create partitions for the drives
|
||||||
fdisk /dev/nvme0n1
|
fdisk /dev/nvme0n1
|
||||||
# Create new GPT table and make 5 partitions
|
# Create new GPT table and make 5 partitions
|
||||||
# first for boot (1G), second for swap (16G),
|
# first for boot (1G), second for swap (16G),
|
||||||
# third for root 1 (100G), fourth for root 2 (100G), fifth for data (rest ~714G)
|
# third for root (256G), fifth for data (rest ~680G)
|
||||||
fdisk /dev/nvme1n1
|
|
||||||
# Create new GPT table with single partition
|
|
||||||
fdisk /dev/sda
|
|
||||||
# Create new GPT table with single partition
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Format partitions that shouldn't be encrypted
|
Format partitions that shouldn't be encrypted
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkfs.fat -F 32 /dev/nvme0n1p1
|
mkfs.fat -F 32 /dev/nvme0n1p1
|
||||||
fatlabel /dev/nvme0n1p1 BOOT
|
fatlabel /dev/nvme0n1p1 EFI
|
||||||
mkswap -L SWAP /dev/nvme0n1p2
|
mkswap -L SWAP /dev/nvme0n1p2
|
||||||
```
|
```
|
||||||
|
|
||||||
Format drives using LUKS for encryption and open them to mapper devices
|
Format drives using LUKS for encryption and open them to mapper devices
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cryptsetup luksFormat --label ARCH_ROOT1 /dev/nvme0n1p3
|
cryptsetup luksFormat --type luks2 --label LINUXROOT /dev/nvme0n1p3
|
||||||
cryptsetup luksFormat --label ARCH_ROOT2 /dev/nvme0n1p4
|
cryptsetup luksFormat --type luks2 --label DATA /dev/nvme0n1p4
|
||||||
cryptsetup luksFormat --label DATA /dev/nvme0n1p5
|
|
||||||
cryptsetup luksFormat --label DATA2 /dev/sda1
|
|
||||||
cryptsetup luksFormat --label BACKUPS /dev/nvme1n1p1
|
|
||||||
|
|
||||||
cryptsetup luksOpen /dev/disk/by-label/ARCH_ROOT1 cryptroot
|
cryptsetup luksOpen /dev/disk/by-label/LINUXROOT cryptroot
|
||||||
cryptsetup luksOpen /dev/disk/by-label/ARCH_ROOT2 cryptroot2
|
|
||||||
cryptsetup luksOpen /dev/disk/by-label/DATA cryptdata
|
cryptsetup luksOpen /dev/disk/by-label/DATA cryptdata
|
||||||
cryptsetup luksOpen /dev/disk/by-label/DATA2 cryptdata2
|
|
||||||
cryptsetup luksOpen /dev/disk/by-label/BACKUPS cryptbackups
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Create EXT4 filesystem on the encrypted drives
|
Create BTRFS filesystem on the encrypted drives
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkfs.ext4 -L ARCH_HYPRLAND /dev/mapper/cryptroot
|
mkfs.btrfs -f -L CRYPTROOT /dev/mapper/cryptroot
|
||||||
mkfs.ext4 -L ARCH_KDE /dev/mapper/cryptroot2
|
mkfs.btrfs -f -L DATA /dev/mapper/cryptdata
|
||||||
mkfs.ext4 -L CRYPTDATA /dev/mapper/cryptdata
|
|
||||||
mkfs.ext4 -L CRYPTDATA2 /dev/mapper/cryptdata2
|
|
||||||
mkfs.ext4 -L CRYPTBACKUPS /dev/mapper/cryptbackups
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Mount the drives
|
Mount the drives
|
||||||
|
@ -63,15 +50,22 @@ Mount the drives
|
||||||
```bash
|
```bash
|
||||||
mount /dev/mapper/cryptroot /mnt
|
mount /dev/mapper/cryptroot /mnt
|
||||||
mount /dev/disk/by-label/BOOT /mnt/efi --mkdir
|
mount /dev/disk/by-label/BOOT /mnt/efi --mkdir
|
||||||
mkdir /mnt/efi/arch-hyprland /mnt/efi/arch-kde
|
mkdir /mnt/efi/arch-1
|
||||||
mount --bind /mnt/efi/arch-kde /mnt/boot --mkdir
|
mount --bind /mnt/efi/arch-1 /mnt/boot --mkdir
|
||||||
mount /dev/mapper/cryptdata /mnt/mnt/data --mkdir
|
mount /dev/mapper/cryptdata /mnt/mnt/data --mkdir
|
||||||
mount /dev/mapper/cryptdata2 /mnt/mnt/data2 --mkdir
|
|
||||||
mount /dev/mapper/cryptbackups /mnt/mnt/backups --mkdir
|
|
||||||
mount /dev/mapper/cryptroot2 /mnt/mnt/arch-kde --mkdir
|
|
||||||
swapon /dev/disk/by-label/SWAP
|
swapon /dev/disk/by-label/SWAP
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Create BTRFS subvolumes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
btrfs subvolume create /mnt/home
|
||||||
|
btrfs subvolume create /mnt/var
|
||||||
|
btrfs subvolume create /mnt/var/log
|
||||||
|
btrfs subvolume create /mnt/var/cache
|
||||||
|
btrfs subvolume create /mnt/var/tmp
|
||||||
|
```
|
||||||
|
|
||||||
## Base installation
|
## Base installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -84,8 +78,7 @@ arch-chroot /mnt
|
||||||
Configure essentials
|
Configure essentials
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pacman -S networkmanager neovim sudo reflector pacman-contrib man-db man-pages \
|
pacman -S git btrfs-progs
|
||||||
rsync btop bind tldr git base-devel
|
|
||||||
ln -sf /usr/share/zoneinfo/CET /etc/localtime
|
ln -sf /usr/share/zoneinfo/CET /etc/localtime
|
||||||
hwclock --systohc
|
hwclock --systohc
|
||||||
sed -i 's/^#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen
|
sed -i 's/^#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen
|
||||||
|
|
|
@ -30,6 +30,8 @@ pacman -S --noconfirm --needed python-rich bc lua jq bat
|
||||||
# Copy over system configuration data
|
# Copy over system configuration data
|
||||||
cp root/etc/pacman.conf /etc
|
cp root/etc/pacman.conf /etc
|
||||||
cp root/etc/hosts /etc
|
cp root/etc/hosts /etc
|
||||||
|
HOSTNAME="$(cat /etc/hostname)"
|
||||||
|
sed -i "s/^127.0.1.1 pc.localdomain pc/127.0.1.1 ${HOSTNAME}.localdomain ${HOSTNAME}/g" /etc/locale.gen
|
||||||
install -m 640 root/etc/sudoers /etc
|
install -m 640 root/etc/sudoers /etc
|
||||||
install -m 640 root/etc/sudoers.d/* /etc/sudoers.d
|
install -m 640 root/etc/sudoers.d/* /etc/sudoers.d
|
||||||
cp root/etc/modprobe.d/nobeep.conf /etc/modprobe.d # disable motherboard speaker
|
cp root/etc/modprobe.d/nobeep.conf /etc/modprobe.d # disable motherboard speaker
|
||||||
|
@ -41,6 +43,10 @@ cp root/.rsync-filter /
|
||||||
# Sync pacman repos after /etc/pacman.conf got updated
|
# Sync pacman repos after /etc/pacman.conf got updated
|
||||||
sudo pacman -Sy
|
sudo pacman -Sy
|
||||||
|
|
||||||
|
# Install zsh and make it the default shell for root
|
||||||
|
sudo pacman -S --noconfirm --needed zsh
|
||||||
|
chsh -s /usr/bin/zsh root
|
||||||
|
|
||||||
# Copy ZSH shell configuration
|
# Copy ZSH shell configuration
|
||||||
mkdir -p /etc/zsh
|
mkdir -p /etc/zsh
|
||||||
cp -ra root/etc/zsh /etc
|
cp -ra root/etc/zsh /etc
|
||||||
|
@ -52,10 +58,6 @@ rm -rf ~/.config/zsh/.zgenom
|
||||||
git clone https://github.com/jandamm/zgenom ~/.config/zsh/.zgenom
|
git clone https://github.com/jandamm/zgenom ~/.config/zsh/.zgenom
|
||||||
install -m 700 -d ~/.local/share/gnupg
|
install -m 700 -d ~/.local/share/gnupg
|
||||||
|
|
||||||
# Install zsh and make it the default shell for root
|
|
||||||
sudo pacman -S --noconfirm --needed zsh
|
|
||||||
chsh -s /usr/bin/zsh root
|
|
||||||
|
|
||||||
# Enable some basic services
|
# Enable some basic services
|
||||||
systemctl enable systemd-resolved
|
systemctl enable systemd-resolved
|
||||||
systemctl enable NetworkManager
|
systemctl enable NetworkManager
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
# Current system definition
|
# Current system definition
|
||||||
127.0.1.1 pc.localdomain pc
|
127.0.1.1 pc.localdomain pc
|
||||||
|
|
||||||
# Extra systems on the network
|
|
||||||
10.1.0.1 localserver.localdomain localserver
|
|
||||||
|
|
||||||
# DNS servers
|
# DNS servers
|
||||||
45.90.30.0 nextcloud-dns
|
45.90.30.0 nextcloud-dns
|
||||||
1.1.1.1 couldflare-dns
|
1.1.1.1 couldflare-dns
|
||||||
|
|
Loading…
Reference in a new issue