Created
April 7, 2023 11:20
-
-
Save HemanthJabalpuri/70877ff038b14744648ac22a67041b62 to your computer and use it in GitHub Desktop.
Install Arch Linux manually in virt-manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Arch Linux in Virtual Manager (using CentOS) | |
Ref: | |
https://wiki.archlinux.org/title/installation_guide | |
https://itsfoss.com/install-arch-linux/ | |
- Add new connection and select arch iso | |
- 1 GiB RAM and 5 GiB of Disk space is enough for headless install | |
- It will boot with BIOS mode (not UEFI) | |
- Check connection with | |
# ping google.com | |
Partition the harddisk | |
# fdisk -l | |
# fdisk /dev/vda | |
: n | |
Partition type : (Enter) | |
Partition number : (Enter) | |
First sector : (Enter) | |
Last Sector: +2G | |
: t | |
Hex code: 82 | |
: n | |
Partition type : (Enter) | |
Partition number : (Enter) | |
First sector : (Enter) | |
Last Sector: (Enter) | |
: w | |
Format as swap and turn it ON | |
# mkswap /dev/vda1 | |
# swapon /dev/vda1 | |
Format as ext4 and mount | |
# mkfs.ext4 /dev/vda2 | |
# mount /dev/vda2 /mnt | |
Download and install packages to the hard disk | |
# pacstrap -K /mnt base linux networkmanager nano | |
base contains all packages required for linux to work and | |
linux packages contains the kernel | |
It will download (345.47 MiB in my case) stuff from Internet, so wait until it finishes | |
Generate fstab | |
# genfstab -U /mnt >> /mnt/etc/fstab | |
Change root to the newly generated system | |
# arch-chroot /mnt | |
Now you are in your newly installed arch linux | |
Let's configure it | |
Time Zone | |
# ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime | |
# hwclock --systohc | |
Localization | |
Uncomment "en_IN UTF-8" in /etc/locale.gen file | |
# locale-gen | |
# echo LANG=en_IN.UTF-8 > /etc/locale.conf (_ will be in variables beginning with XDG) | |
# export LANG=en_IN.UTF-8 | |
Network configuration | |
# echo myarch > /etc/hostname | |
# nano /etc/hosts | |
127.0.0.1 localhost | |
::1 localhost | |
127.0.1.1 myarch | |
# systemctl enable NetworkManager | |
Put Root password | |
# passwd | |
Install Grub bootloader to the disk (6.83 MiB is Downloaded in my case) | |
# pacman -S grub | |
# grub-install /dev/vda | |
# grub-mkconfig -o /boot/grub/grub.cfg | |
Exit from chroot | |
# exit | |
Unmount mnt | |
# umount /mnt | |
Reboot the Virtual Machine | |
# reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment