What is arch linux?
Arch Linux is a GNU/Linux distribution, which aims at providing the latest stable version of most of the softwares by following a rolling release model. It defines simplicity without adding unnecessary modifications. It is designed to boot on-line, so that you will get the latest version of Arch in any way. If you have already arch installed on your system then you can always upgrade it by using [pacman -Syu] command. When you boot arch Linux from USB it will automatically start DHCPCD and drop a ZSH shell. you can use nano, VIM to modify any file.
Before installation:
- Verify the boot mode [ls /sys/firmware/efi/efivars]
If the directory does not exist then your system might be booted in BIOS or CSM mode, else it is UEFI.
- Connect to Internet:
If Arch did not get any IP address do run [dhcpcd] manually.
- for wireless connectivity:-
[iw dev] to get wireless interface name.
[iw dev INTERFACE link] to get the status of the interface.
[iw dev INTERFACE scan | grep SSID: | sort | uniq] to get all the WIFIs around you.
[wpa_supplicant -i INTERFACE -c ("SSID" "KEY")] to connect the SSID from terminal.
[dhcpcd INTERFACE] to get dhcp started on the interface.
- Update the system clock:
[timedatectl status] to get current status.
[timedatectl set-ntp true] to enable NTP, so that it could update time from internet.
- Preparing disks:
Partitions required: '/', 'swap', 'efi' [for UEFI systems only]
[cfdisk /dev/sda] to start partitioning, then write it and exit.
[mkfs.ext4 /dev/sda1] to formart /dev/sda1 with ext4 assuming sda1 as '/'
[mount /dev/sda1 /mnt] to mount sda1 in /mnt
[mkdir /mnt/boot] [mount /dev/sda2 /mnt/boot] to create boot directory inside mnt and to mount optionally created sda2[efi or boot partition].
## genfstab will later detect mounted file systems and swap space.
[swapon /dev/sda3] to enabling sda3 as swap assuming sda3 as swap partition.
Start installing the OS:
- Installing the base package:
[pacstrap /mnt base] It would install base packages if you want extra packages such as base-devel then
[pacstam /mnt base base-devel] instead of above command
[genfstab -U /mnt >> /mnt/etc/fstab] (Use -U or -L to define UUID or Lables respectively) It is to generate fstab configuration file in the new system.
- Change root into the new system:
[arch-chroot /mnt]
- Setting Timezone:
[ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime]
- Locale:
Uncomment the en_US.UTF-8 UTF-8 and other needed localizations in the /etc/locale.gen using nano or vi
[locale-gen] to generate locale
- Hostname:
[echo HOSTNAME > /etc/hostname] to create hostname file with the name HOSTNAME
- INITRAMFS:
[mkinitcpio -p linux] to create initramfs.
NOTE: Creating a new initramfs is not required as pacstrap has already done this. If you want any special changes then configure mkinitcpio.conf file and recreate initramfs using above command.
- Root password:
[passwd root]
BOOT LOADERS:
In order to boot arch linux, a linux capable bootloader must be installed to Master Boot Record(MBR) or the GUID Partition Table(GPT). It is the first piece of software started by the BIOS or UEFI. It is responsible for loading the kernel with the wanted kernel parameters and initial RAM disk (initramfs) before initiating the boot process.
NOTE:
- Boot loaders only need to support the file systems on which kernel and initramfs reside (the file system of the partition on which /boot is located)
- As GPT is part of the UEFI specification, all UEFI boot loaders support GPT disks. GPT on BIOS systems is possible, using either "hybrid booting", or the new GPT-only protocol. This may cause issues with certaion BIOS implementations.
- GRUB installation:
You should be more careful while installing GRUB, specially when you are dual or triple booting your system.
Arch wiki on GRUB installation
[pacman -S grub-bios] to sync grub-bios
[grub-install /dev/sda] to install the grub. follow above Linux to get appropriate command for your system configuration.
[grub-mkconfig -o /boot/grub/grub.cfg] to generate grub configuration file.
- Generate FSTAB:
[exit] to exit from chroot environment.
[genfstab /mnt >> /mnt/etc/fstab] It would read all your partitions and store in fstab file so that the partitions would be mounted the next time you boot up your Linux.
- Reboot:
Before rebooting unmount /mnt [umount -R /mnt] if error occurs then use fuser command to check the busy processes.
You are all set to use your new Arch Linux.
Enjoy...
Thanks
Ayush
Arch Linux is a GNU/Linux distribution, which aims at providing the latest stable version of most of the softwares by following a rolling release model. It defines simplicity without adding unnecessary modifications. It is designed to boot on-line, so that you will get the latest version of Arch in any way. If you have already arch installed on your system then you can always upgrade it by using [pacman -Syu] command. When you boot arch Linux from USB it will automatically start DHCPCD and drop a ZSH shell. you can use nano, VIM to modify any file.
Before installation:
- Verify the boot mode [ls /sys/firmware/efi/efivars]
If the directory does not exist then your system might be booted in BIOS or CSM mode, else it is UEFI.
- Connect to Internet:
If Arch did not get any IP address do run [dhcpcd] manually.
- for wireless connectivity:-
[iw dev] to get wireless interface name.
[iw dev INTERFACE link] to get the status of the interface.
[iw dev INTERFACE scan | grep SSID: | sort | uniq] to get all the WIFIs around you.
[wpa_supplicant -i INTERFACE -c ("SSID" "KEY")] to connect the SSID from terminal.
[dhcpcd INTERFACE] to get dhcp started on the interface.
- Update the system clock:
[timedatectl status] to get current status.
[timedatectl set-ntp true] to enable NTP, so that it could update time from internet.
- Preparing disks:
Partitions required: '/', 'swap', 'efi' [for UEFI systems only]
[cfdisk /dev/sda] to start partitioning, then write it and exit.
[mkfs.ext4 /dev/sda1] to formart /dev/sda1 with ext4 assuming sda1 as '/'
[mount /dev/sda1 /mnt] to mount sda1 in /mnt
[mkdir /mnt/boot] [mount /dev/sda2 /mnt/boot] to create boot directory inside mnt and to mount optionally created sda2[efi or boot partition].
## genfstab will later detect mounted file systems and swap space.
[swapon /dev/sda3] to enabling sda3 as swap assuming sda3 as swap partition.
Start installing the OS:
- Installing the base package:
[pacstrap /mnt base] It would install base packages if you want extra packages such as base-devel then
[pacstam /mnt base base-devel] instead of above command
[genfstab -U /mnt >> /mnt/etc/fstab] (Use -U or -L to define UUID or Lables respectively) It is to generate fstab configuration file in the new system.
- Change root into the new system:
[arch-chroot /mnt]
- Setting Timezone:
[ln -sf /usr/share/zoneinfo/REGION/CITY /etc/localtime]
- Locale:
Uncomment the en_US.UTF-8 UTF-8 and other needed localizations in the /etc/locale.gen using nano or vi
[locale-gen] to generate locale
- Hostname:
[echo HOSTNAME > /etc/hostname] to create hostname file with the name HOSTNAME
- INITRAMFS:
[mkinitcpio -p linux] to create initramfs.
NOTE: Creating a new initramfs is not required as pacstrap has already done this. If you want any special changes then configure mkinitcpio.conf file and recreate initramfs using above command.
- Root password:
[passwd root]
BOOT LOADERS:
In order to boot arch linux, a linux capable bootloader must be installed to Master Boot Record(MBR) or the GUID Partition Table(GPT). It is the first piece of software started by the BIOS or UEFI. It is responsible for loading the kernel with the wanted kernel parameters and initial RAM disk (initramfs) before initiating the boot process.
NOTE:
- Boot loaders only need to support the file systems on which kernel and initramfs reside (the file system of the partition on which /boot is located)
- As GPT is part of the UEFI specification, all UEFI boot loaders support GPT disks. GPT on BIOS systems is possible, using either "hybrid booting", or the new GPT-only protocol. This may cause issues with certaion BIOS implementations.
- GRUB installation:
You should be more careful while installing GRUB, specially when you are dual or triple booting your system.
Arch wiki on GRUB installation
[pacman -S grub-bios] to sync grub-bios
[grub-install /dev/sda] to install the grub. follow above Linux to get appropriate command for your system configuration.
[grub-mkconfig -o /boot/grub/grub.cfg] to generate grub configuration file.
- Generate FSTAB:
[exit] to exit from chroot environment.
[genfstab /mnt >> /mnt/etc/fstab] It would read all your partitions and store in fstab file so that the partitions would be mounted the next time you boot up your Linux.
- Reboot:
Before rebooting unmount /mnt [umount -R /mnt] if error occurs then use fuser command to check the busy processes.
You are all set to use your new Arch Linux.
Enjoy...
Thanks
Ayush
Comments
Post a Comment