Arch linux with virtualbox

imgmaterial / InstallArch.md

After bricking multiple systems with problematic poackages and doing multiple installs of the same desctop envirnoment I have ended up with my own system that was a combination of the Arch Wiki installation manual and two other individual guides to the arch installation process. To futureproof myself from having to juggle three different installation guides I decided to collect the whole process I use for my arch installation in a single file. Here are the links to the Arch Wiki and the two guides from which some part of this guide were collected:

This partucular guide will walk you step by step through the installation process of Arch in a VirtualBox and instyallation of i3 window manager as well as some basic goodies such as compositor and wallpaper manager. The third guide from the links above provides some additional details for the customization of your system while the second link gives a more detailed explanation for most steps of the process.

Go through the setup process provided by the virtualbox envirnoment. After you have setup the VM change the amount of video memory to 128 MB and enable 3D acceleration in the display options, this is crucial for the i3 manager to perform well.

Alternate image text

Boot the system from the ISO file.

Alternate image text

Alternate image text

The output should look simmilar to the following screenshot, the values don’t matter.

Setting the keyboard layout to the us keyboard should look like this.

Check Internet Connection.

If you are setting up Arch inside of a Virtual Machine or with an Ethernet cable attached then the internet should work as is. For Wi-Fi connection refer to the Arch Wiki: https://wiki.archlinux.org/title/Network_configuration/Wireless Check if you are connected:

Читайте также:  Редактор горячих клавиш linux

Alternate image text

Partition and formatting are the bulk of work in arch installation. At the same time its pretty badly described on the Wiki. First take a look at the availible disks and make sure you know which one you plan to partitions.

Alternate image text

In my case the disk to be formated is sda. The Wiki does the partition from the command line, however I find using cfdisk utility to be significantly easiers. Make sure to write the right disk name!

Alternate image text

Select the gpt partition option. And create 3 partitions. First partition is for booting, its recomended by the Wiki to provide it with 512 Mb of space however you would be able to get away with only allocating 256 M. The second partition is the swap partition allocate 1 — 2 Gb to it. Finally the filesystem partition is the part of the system you will keep all of your files on so allocate the rest of your space to it. Finally set the types of the partitions to EFI Partition, Linux Swap and Linux Filesystem. The following should be approximatly what you have with exception of allocated space.

Alternate image text

Write the partitions and check the result using fdisk -l

You should be able to observe the partitions that you just created.

Alternate image text

Format the newly created partitions as follows:

 # mkfs.fat -F32 /dev/sda1 # mkfs.ext4 /dev/sda3 # mkswap /dev/sda2 # swapon /dev/sda2 

Alternate image text

Finally mount the partitions

 # mount /dev/sda3 /mnt # mkdir -p /mnt/boot # mount /dev/sda1 /mnt/boot 

Finally time to install the system.The first four packages are your base system, nano is a text editior which you can swap out to your preferred one. Using pacstrap:

 # pacstrap -i /mnt base base-devel linux linux-firmware nano 

There would be a huge amount of output and a few seconds to few minutes depending on your internet speed to install all of the packages.

 # genfstab -U /mnt >> /mnt/etc/fstab 

And chack the generated fstab

Читайте также:  Задать права пользователя linux

Alternate image text

Change Root, Time, locale etc.

Alternate image text

Alternate image text

Use your text editor to access locale.gen and uncomment the lacale you plan to use. I will use the en_US locale.

Alternate image text

After saving, generate the locale by running:

Alternate image text

After that edit the generated locale.conf by adding a line LANG=

Alternate image text

Set your time zone using tzselect

The utility makes life pretty easy

Alternate image text

Lastly create a symbolic link with the regions that you got in tzselect.

 # ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime 

Alternate image text

Copy the sample Arch config file

 # cp /usr/share/systemd/bootctl/arch.conf /boot/loader/entries/ 

And note your PARTUUID for the file-system partition.

Alternate image text

Edit your arch.conf as follows.

 # nano /boot/loader/entries/arch.conf 

Change the root=PARTUUID from XXXX to the PARTUUID of your filesystem partition noted before and rootfstype to ext4.

Alternate image text

 # nano /boot/loader/loader.conf 

Alternate image text

 # echo "archhost" > /etc/hostname 

Alternate image text

SSH NetworkManager and dhcpcd.

 # pacman -S openssh dhcpcd networkmanager network-manager-applet 

Alternate image text

Enable the services so you wouldn’t have to manually activate them.

 # systemctl enable sshd # systemctl enable dhcpcd # systemctl enable NetworkManager 

Alternate image text

If everyting was done correctly then you can reboot into your newly installed system.

Post- installation: New User, i3wm etc.

 # useradd -m -G wheel user # passwd user 

Change the sudoers file to allow wheel group members to use sudo command.

Alternate image text

Find this line an uncomment it:

 # sudo pacman -S xorg-server xorg-apps xorg-xinit # sudo pacman -S i3-gaps i3blocks i3lock i3status numlockx 

Install and enable lightdm.

 # sudo pacman -S lightdm lightdm-gtk-greeter --needed # sudo systemctl enable lightdm 
 # sudo pacman -S alacritty neofetch rxvt-unicode rofi firefox nitrogen picom 

Where alacritty is terminal emulator nitrogen is wallpaper manager and picom is the compositor.

After this reboot the system.

Читайте также:  Linux firewalld открыть порт

Alternate image text

You will be greeted wit hte login screen.

Login and say yes to generating the config file. Choose the MOD shrtcut, you are offered either alt or logo key from your keyboard. Open the terminal with alt/logo+enter combination. Open the config file.

Alternate image text

Find the line corresponding to the termianll and change it to your terminal of choice, in my case alacritty

If you will be using nitrogen and picom then add this two lines to the config file.

 exec --no-startup-id picom exec --no-startup-id nitrogen --restore 

Download a background picture if you want one and set it using

Where Pictures is the directory where you store your images. Afterwards reboot the system to enable all of the changes.

Alternate image text

After relogging you will have a perfectly working envirnoment which you can modify as you see fit or just use as is.

Источник

Оцените статью
Adblock
detector