I use Arch BTW
Contents
- Networking: ON πΌ
- Set timedate π
- Partition it right ποΈ
- LUKS here
- Logical Being
- Format Partitions π
- Mount Partitions π
- Select Mirrors for download πͺ
- Bare Minimum Things π¦Ί
- The Main Course :pot_of_food:
- Dessert π¦
- Generating EFI π§¬
- Bare minimum things π€
- Final Touch :man_getting_haircut:
Sometimes, I want to shout, as loud as I could. Why you ask? Simple, ITS ANNOYING AF TO REINSTALL OS WITHOUT PROPER GUIDE. This journal entry mentions the step-by-step instructions on how I personally install Arch on my system.
Although, most of things I do are scripted but the steps remain same everytime. Even if you use Ansible, you have to atleast check the scripts and tune it according to your preference.
Networking: ON πΌ
# If you are using Ethernet/Wired connection
# If you are using wireless
Set timedate π
# Set time and date
# Check if date is correct
# Write the correct date to CMOS RTC
# Check if date and time is correct on RTC clock
Partition it right ποΈ
STOR_DEVICE=/dev/nvme0n1
# Set partition table to GPT
# Creates first partition of size 512 MB as format type fat32
# Set bootable flag to ON for first partition
# Creates second partition with name ArchLinux and format type as ext4, taking rest of space.
LUKS here
# LUKS encrypting drive for security, I always choose the best encryption. (NOT RECOMMENDED FOR OLDER PCs)
# Unlock the newly created encrypted partition (Shows up in /dev/mapper/whatever)
Logical Being
# First: Create a physical volume
# Second: Creates a Volume Group of mentioned name
# Third: Create a logical volume/partition on the previously created volume group
# lvcreate --size 1G arch --name swap
Format Partitions π
Mount Partitions π
Select Mirrors for download πͺ
Bare Minimum Things π¦Ί
The Main Course :pot_of_food:
# Generate fstab and chroot into your new installation
# Generate Locale
# Set the hostname
# Enable wheel group for sudoers
# Add the primary user
Now we will add mkinitcpio file for generating initramfs. Open with vim /etc/mkinitcpio.conf
All the files are added here for this website.
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
MODULES=(ext4)
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=()
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect block filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block filesystems)
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS=(base udev block mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block filesystems keyboard keymap lvm2 encrypt resume fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
COMPRESSION="cat"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
After editing the file, please run mkinitcpio -p linux
Dessert π¦
To add cherry on top, we will use yay AUR helper, for installing packages
Generating EFI π§¬
Create new file called /boot/cmdline.txt
and enter the following
cryptdevice=UUID= :lvm:allow-discardsroot=/dev/mapper/arch-root
after entering this, replace the line with sed -i s/%uuid%/$(blkid -o value -s UUID /dev/nvme0n1p2)/ /boot/cmdline.txt
Now the main part,
If you use lts versions of this
Finally, copy the generated bootloader in your EFI directory /efi/EFI/BOOT/
Bare minimum things π€
Lastly, I am adding a list here to install things that can be the quintessential things for you noobies with big boobies :squinting_face_with_tongue:
Final Touch :man_getting_haircut:
If you have reached till the end then good job! You and I both know that your system is working now. If you want to add some additional pointers then you are welcome to do so! Just email me the things you need to mention along with your fauxname (twitter, github handle etc.) so I personally can shoutout to you for that.