Install Arch Linux in VirtualBox VM GitHub
Install Arch Linux in VirtualBox VM GitHub
thomasheller / INSTALL.md
Last active 5 days ago
INSTALL.md
Download
Download the latest version from: https://www.archlinux.org/download/
Verify checksums.
Prepare VM
Create a new VM, choose type Linux and version Arch Linux (64-bit). Allocate a reasonable amount of
RAM and create a new hard disk.
Make sure the VM has two network adapters enabled: Adapter 1 attached to NAT and Adapter 2
attached to Host-only adapter vboxnet0 if you have multiple VMs inside a host-only network.
Attach the ISO image to your VM and boot into Arch's live system.
Pre-flight checks
Check network: ping archlinux.org
Installation
Partition the disk:
1. fdisk /dev/sda
2. n -- new partition
3. (enter) ( p -- primary disk)
4. (enter) ( 1 -- partition number)
5. (enter) set first sector
6. (enter) set last sector (use whole disk)
7. w -- write partition table and quit
Format partition:
mkfs.ext4 /dev/sda1
Mount the filesystem:
mount /dev/sda1 /mnt
Generate /etc/fstab :
genfstab -U /mnt >>/mnt/etc/fstab
Generate /etc/adjtime :
hwclock --systohc
Enable locale:
Install GRUB:
1. pacman -S grub
2. grub-install --target=i386-pc /dev/sda
3. grub-mkconfig -o /boot/grub/grub.cfg
Reboot:
1. exit
2. umount -R /mnt
3. reboot
Post-installation steps
Login as root using your password.
Add non-root user with sudo permissions and Zsh as the default shell:
1. Install sudo and Zsh:
pacman -S sudo zsh
3. Set password:
passwd john
(your password)
(your password)
Setup swap:
1. Install systemd-swap:
pacman -S systemd-swap
Install X11:
Optional steps
• Install your window manager of choice.
• Activate bi-directional clipboard in the VM settings and install the Guest Additions.
• Switch to linux-lts kernel.
You mentioned installing xterm twice, was this intentional? Please keep this post up, I can't install Arch without it.
Hi @iZel345 That is not normal. You will not be able to boot because there was an installation problem.
This step pacstrap /mnt base does not install the linux kernel. Run pacstrap /mnt base linux (or linux-lts) instead. You
can recover your installation if you add back the archlinux iso and reboot from the disk. Then rerun:
I had 3 problems:
1. After chroot, there was no vi. pacman -Syu nano solved it.
2. Could not activate the dhcpcd service, since it didn't exist.
3. After reboot the linux kernel was missing. You should update your instructions (seems to happen to others as well)
There is no xorg-server-utils (anymore), neither are xorg-apps
Make sure the VM has two network adapters enabled: Adapter 1 attached to NAT and Adapter 2 attached to Host-only
adapter vboxnet0 if you have multiple VMs inside a host-only network.
The NAT network adapter can only be enabled on the first adapter after creating one in VirtualBox from the menu in Tools
> Network > 'NAT Networks' section > Create (from the top bar). After this it will show up and can be selected in the settings
of your Arch VM under the Networks tab. That fixed the problem for me.
ping: archlinux.org: Temporary failure in name resolution can't download pacman files.
Had the same problem I tried to install debian and had no connection to the internet either, it turned out I had to disable
my VPN no problems after that.
If you want to automate most of the process these 3 commands worked for me.
1. ping archlinux.org
2. pacman -Sy archlinux-keyring
3. archinstall
Welp.. I'm only getting errors whenever I try to do most of the post-installation steps.. they all just fail to retrieve
ping: archlinux.org: Temporary failure in name resolution can't download pacman files.
Had the same problem I tried to install debian and had no connection to the internet either, it turned out I had to
disable my VPN no problems after that.
If you want to automate most of the process these 3 commands worked for me.
1. ping archlinux.org
2. pacman -Sy archlinux-keyring
3. archinstall
You can download a VirtualBox or VMWare image of Arch Linux over here: https://www.osboxes.org/arch-linux/
mount the iso again and type this commands from the instalation terminal:
after the reboot remove the iso and arch should allow you to log as root.