|Easy Arch Linux installation
|Page 1 of 1|
|Author:||KimChoJapFan [ Wed Oct 12, 2016 10:14 am ]|
|Post subject:||Easy Arch Linux installation|
Before we start:
It is recommended that you use the latest CD image for installing Arch Linux.
Plus you might want to consider the following information when it comes to partitioning your hard drive:
Windows operating systems use a binary-based measurement for storage capacity. UNIX-based operating systems use the same measurement for storage capacity that hard drives use when they advertise their storage capacities. (Which explains why your 1 TB hard drive shows up as 931 GB in Windows)
Refer to this whenever you get confused about partitioning your hard drive:
1 Kibibyte in Windows - 2 ^ 10 Bytes - Symbol: KiB.
1 Kilobyte in UNIX - 1000 ^ 1 Bytes - Symbol: KB.
1 Mebibyte in Windows - 2 ^ 20 Bytes - Symbol: MiB.
1 Megabyte in UNIX - 1000 ^ 2 Bytes - Symbol: MB.
1 Gibibyte in Windows - 2 ^ 30 Bytes - Symbol: GiB.
1 Gigabyte in UNIX - 1000 ^ 3 Bytes - Symbol: GB.
1 Tebibytes in Windows - 2 ^ 40 Bytes - Symbol: TiB.
1 Terabyte in UNIX - 1000 ^ 4 Bytes - Symbol: TB.
I know this sounds strange, but it's crucial to know this information before you continue in this tutorial since I'll be referencing storage capacities using their respective symbols.
Determining your partitions:
In this tutorial I'll be creating 3 partitions of an 80.0 GB virtual hard drive:
Plus we'll be using a GPT partition table over the classic MBR partition table, so if you plan on making this a dual-boot installation on the same hard drive, then make sure that your hard drive is already running with a GPT partition table before continuing with this guide.
Our boot partition is EFI so that means we'll be requiring a 260 MB partition to store the EFI bootloader. I've tried this with a smaller boot partition and GRUB wouldn't install correctly so I stand by the 260 MB boot partition size for EFI, it'll be 1007 KiB for non-EFI boot partitions.
The size of your SWAP partition depends on the size of your RAM as the SWAP partition can only be set once and will be used to store the information of background programs so you have more RAM available for foreground programs. The SWAP partition is optional, but severely recommended.
The size of your ROOT partition depends on how much space you want to have available for your installation, and by the time we're finished adding a desktop environment and some programs in this tutorial; I'll show you methods of cleaning up space on your installation whenever you need more space.
Since I plan on using all 80 GB of the virtual hard drive, my partitions will look like this:
Yours will look different, but that's no need to worry, just subtract 260 MB and the amount of RAM you have from the total storage capacity of your hard drive and you'll have the maximum size for your ROOT partition.
Partitioning our Hard Drive:
Once you have the plan for your installation, we'll begin by ensuring that our hard drive is both recognized and available for partitioning by the following command:
lsblk | grep sd
The above command should only relay the inserted storage devices (hence the 'sd' in the name) and the storage size of the drives. Find your hard drive in the list if there's more than one result, if there are no results, then reboot the system and restart the Arch Linux installation in hopes that your hard drive re-initializes when it boots back up into the Arch Linux installation.
Once you determine the hard drive that you'll be installing Arch Linux on, we'll issue the following command to begin partitioning the drive:
Make sure that you replace the 'sda' in the code to match your hard drive's 'sdX' identifier.
What you should see:
From the menu we'll perform the following actions:
New -> 260M -> Type -> EFI System
Then we'll proceed to create our SWAP partition (use the size of your RAM for this):
New -> 4G -> Type -> Linux swap
Then we'll proceed to create our ROOT partition:
New -> Enter -> Write
Here's what that looks like when you're finished:
Formatting our Partitions:
We'll be formatting our partitions in this manner:
mkfs.fat -F32 /dev/sda1
That will format our EFI BOOT partition
That will format our ROOT partition to the EXT4 format which is recommended for Linux installations.
This will create and initialize our SWAP partition.
This is what you should see before you continue:
Mounting and Installing Arch Linux:
We will begin by mounting our ROOT partition to the '/mnt' directory and then creating a new directory to store our BOOT partition.
mount /dev/sda3 /mnt
mkdir -p /mnt/boot
Then we will proceed to mount our BOOT partition:
mount /dev/sda1 /mnt/boot
Then we will proceed to download the Arch Linux installation files (prepare for long download process):
pacstrap -i /mnt base base-devel grub efibootmgr sudo
This process took me 16 minutes and 41.64 seconds to complete. The downloading part will usually take the longest.
Here's what you should see when this is finished:
Now we will proceed to generating our fstab file that contains partition information:
genfstab -U /mnt > /mnt/etc/fstab
Setting up our Arch Linux installation:
Now it's time to chroot into our new Arch installation:
arch-chroot /mnt /bin/bash
From here we will generate our initial ramdisk environment:
mkinitcpio -p linux
Then we will install our bootloader:
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub /dev/sda --recheck
Then we will generate our bootloader configuration file:
grub-mkconfig -o /boot/grub/grub.cfg
Now we will create our user account:
useradd -m -G wheel -s /bin/bash malcontent
You can replace 'malcontent' with any username you wish to choose for your system.
Now it's time to set the passwords for our root account and our user account:
Now we will edit our sudo config to allow our new user account to act as an administrator:
EDITOR=nano visudo -> CTRL+W -> %wheel -> backspace -> backspace -> CTRL+O -> CTRL+X
Now we will set up our timezone:
Now we will generate, list, and select our locale:
localectl set-locale LANG=en_US.UTF-8
This sets up the U.S. English UTF-8 locale option which is recommended for those who live in the United States and/or for those who can read English. (If not, then how are you reading this?)
To finish off, we will set up a service for our wired network connection. We need to find the interface name for our connection:
For me, I found that VMware uses 'ens33' for its network interface name. My laptop uses 'wlp2s0' for its wireless network interface name.
It's time to create the service here:
systemctl enable firstname.lastname@example.org
Now you'll have a network connection for the final parts of this tutorial.
Rebooting and grabbing a desktop environment:
Now it's time to exit our chroot environment:
Then we will unmount our boot and root partitions:
umount -R /mnt/boot
umount -R /mnt
Then we will reboot our system:
Make sure you remove your installation medium when the screen goes dark so you can boot into your freshly installed Arch Linux system.
Now we will grab some video drivers for our desktop environment:
If you're using Intel graphics:
sudo pacman -S xorg-server xorg-server-utils xorg-xinit xf86-video-intel
If you're running AMD graphics:
sudo pacman -S xorg-server xorg-server-utils xorg-xinit xf86-video-amdgpu
If you're running Nvidia graphics:
sudo pacman -S xorg-server xorg-server-utils xorg-xinit nvidia
Now it's time to grab ourselves a copy of a desktop environment and a display manager:
sudo pacman -S lightdm gcc-libs deepin deepin-extra
Once we have our desktop environment and display manager, we will need to modify our display manager to load up our desktop environment:
sudo nano /etc/lightdm/lightdm.conf
Now add the following text to the end of the "#backup-logs=true" text in the lightdm.conf file:
Then press a combination of CTRL+O to save and CTRL+X to exit nano text editor.
Now it's time to test out our display manager and desktop environment:
sudo systemctl enable lightdm.service
sudo systemctl start lightdm.service
Here are the finished screenshots:
|Author:||Misaki [ Wed Sep 06, 2017 11:12 am ]|
|Post subject:||Re: Easy Arch Linux installation|
|Author:||KimChoJapFan [ Mon Sep 11, 2017 13:37 pm ]|
|Post subject:||Re: Easy Arch Linux installation|
I should probably make a followup thread to this since this method is about a year old.
|Page 1 of 1||All times are UTC + 1 hour|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group