You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create new Partition (Not needed if you are just re-installing)
#!/bin/bash
fdisk /dev/sdx # change it the the correct disk
EFI Partition
Press `n` to create your first partition, this is for EFI boot
For partision number use default
For first sector use default.
For last sector give +500M
Press `t` to select the type and select `1` which is EFI partition.
Root/Main Partition
Press `n` to create your second partition, this is for root/home partition
For partition number use default.
For first sector use default.
For last sector default, which is all remaining freespace
Press `t` to select the type and set to default LinuxFileSystem
After above steps press `w` to write changes to the disk.
Formating the Partitions
mkfs.fat -F32 /dev/sdx1
mkfs.btrfs /dev/sdx2
Encryption (optional)
Btrfs Mount
Mount the root partition to `/mnt`
mount /dev/sdx2 /mnt
cd /mnt
btrfs subvolume create @ # This is for root
btrfs subvolume create @home # This is for homecd
umount /mnt
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/sdx2 /mnt
mkdir /mnt/home
mkdir /mnt/boot
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/sdx2 /mnt/home
mount /dev/sdx1 /mnt/boot/EFI
Install Arch linux
pacman --noconfirm -Sy archlinux-keyring
pacstrap -K /mnt base linux-lts linux-lts-headers linux-firmware git nvim intel-ucode
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
passwd # For root pass
useradd -m -g users -G wheel nithin
passwd nithin # For nithin user# from here make it as scriptecho"en_US.UTF-8 UTF-8">> /etc/locale.gen
locale-gen
echo"LANG=en_US.UTF-8"> /etc/locale.conf
timedatectl set-timezone Asia/Kolkata
hwclock --systohc
echo"Hostname: "read hostname
echo$hostname> /etc/hostname
echo"127.0.0.1 localhost">> /etc/hosts
echo"::1 localhost">> /etc/hosts
echo"127.0.1.1 $hostname.localdomain $hostname">> /etc/hosts
nvim /etc/mkinitcpio.conf # Add btrfs to the module array
mkinitcpio -p linux-lts