BTW I use arch
If you ever run into an issue about keyring is corrupted use this
sudo pacman -S archlinux-keyring
cant connect to wifi using networkmanager then use iwd (iwctl)
h[ttps://www.youtube.com/watch?v=-Dg4WjVu_E0&t=117s](https://www.youtube.com/watch?v=hnwoek_4MXQ)
if lightdm fails
https://www.debugpoint.com/failed-to-start-lightdm/
Flash the arch iso to a flash drive. Here is the page to the arch .iso file , scroll down and click a link that's under your country. Then download the file that ends with .iso You can use rufus to flash the iso to the flash drive if you're on windows.
Boot from the newly flashed drive (on a lenovo laptop constantly press F12 on start up and go to the newly flashed flash drive).
type loadkeys us
in the terminal.
type iwctl
You'll be in the [iwd] enviroment .
Use device list
to get the name of your wifi device name. Example of wifi device name: wlan0
Get the name of the network you want to connect to. MAKE SURE YOU TYPE YOUR ACUTAL WIFI DEVICE NAME AND NOT "your_device_name"
station your_device_name scan
station your_device_name get-networks
If you can't see the wifi networks then do
rfkill unblock all
If that doesn't work do dchpcd
Connect to the internet. Type your wifi password in.
station your_device_name connect your_network_name
Check if you're connected to the wifi.
station your_device_name show
Nice you're connected to the internet now. Exit by
exit
Now you're back to the arch enviroment.
If you have a nvme (M.2) you're going to
cfdisk /dev/nvme0n1
You can do lsblk
to see if you dont know. You'll see nvme0n1 if you have a nvme or sda if you have a SSD.
If you just have a SSD do
cfdisk
If it asks you
Select label type |
---|
gpt |
dos |
sgi |
sun |
Select gpt. Some of you may not see that and that is okay.
If there are devices already there example: /dev/sda1 ,/dev/sda2 you want to delete all the devices. So hover over the device and hit enter on delete then new. You can move with the arrow keys.
Now you should see device named Free space
. Hovering over that hit enter on [New]
and delete the original parition size and type 100M
hit enter. That is your boot partition. If it asks you primary
or the other thing hit enter on primary
.
This should be called /dev/sda1
Move down to the Free space
. Hit enter on [New]
. Erase the partition size and type in the size of your physical ram size times two. Example: physical ram I have is 16GB, then set the virtual memory partition to 32GB.
This should be /dev/sda2
Hover over Free space
hit enter on [New]
hit enter again.
Move over to Write
hit enter. It'll ask you Are you sure you want to write the partition table to disk?
type yes
and hit enter. Go to [Quit]
and hit enter. Clear the screen by holding CTRL and "L".
Display block devices
lsblk
Look at the output of lsblk
and see which one has the largest SIZE. It should be sda3
.
mkfs.ext4 /dev/sda3
mkfs.fat -F 32 /dev/sda1
mkswap /dev/sda2
mount /dev/sda3 /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
swapon /dev/sda2
First do this
pacman -Sy archlinux-keyring
Do this if you only want a base arch install.
pacstrap /mnt base linux linux-firmware sof-fimware base-devel grub efibootmgr vim nano networkmanager
Don't do this because this is the packages I want.
pacstrap /mnt base linux linux-firmware sof-firmware base-devel grub efibootmgr vim networkmanager dhcpcd reflector iwd alacritty dnsmasq polybar nitrogen neofetch ranger dmenu
To show the file systems that are mounted
genfstab /mnt
To move this to out of the terminal and into a file in our disk
genfstab /mnt > /mnt/etc/fstab
To check you did it right do. The output should be the same as genfstab /mnt
.
cat /mnt/etc/fstab
To change root
arch-chroot /mnt
You can change the country and sub zone. Example: America/New_York instead of country/subzone
ln -sf /usr/share/zoneinfo/country/subzone /etc/localtime
To check if you have the correct country and subzone run
date
To sync the system clock
hwclock --systohc
You're going to edit the locale.gen file. I'm going to use vim as the text editor and It's okay if you don't know how to use vim I will help you along the way. You will have do exactly as I say if you want to use vim and don't know how to use it. If you mess up after typing vim /etc/locale.gen
press ESC
on your keyboard then type :q!
and hit enter. This will make you leave the text editor without making any changes. So if you mess up do that and go back into the file using vim. If you're more comfortable with nano use it.
vim /etc/locale.gen
Now we'll navigate to "#en_US.UTF-8 UTF-8", we do this by typing
/#en_US.UTF-8 UTF-8
Then hit enter and now press s
This will remove the "#" that is in front of US.UTF-8 UTF-8
To save and exit press ESC
on the keyboard and type :wq
this will save the file and quit out of vim.
To generate locale type
locale-gen
To specify the locale, create a file by
vim /etc/locale.conf
Press i
this will get you into insert mode so you can type stuff in the file and type LANG=en_US.UTF-8
. Press ESC
on the keyboard to go into normal mode.To save the file and leave type :wq
Create a file hostname
in the /etc directory
vim /etc/hostname
Type in the name you want. Then save and exit vim.
passwd
useradd -m -G wheel -s /bin/bash type_a_username
To set a user password ```passwd type_a_username``
EDITOR=vim visudo
Find # %wheel ALL=(ALL) ALL
and uncomment the #
then save and quit
systemctl enable NetworkManager
grub-install /dev/sda
config grub
grub-mkconfig -o /boot/grub/grub.cfg
exit by exit
umount -a
reboot
use sudo pacman -Syu
if there's issue about invalid something do this
sudo pacman -Sy archlinux-keyring && sudo pacman -Su
https://www.youtube.com/watch?v=RUxoqSzyTX4