Install arch into virtualbox

This atricle is based on information found on: https://erikdubois.be/how-to-install-arch-linux/

 

FASE 1

cfdisk /dev/sda

label type: gpt
delete all partitions

Mount point Partition Partition type (GUID) Bootable flag Suggested size
/boot /dev/sdx1 EFI System Partition Yes 260–512 MiB
[SWAP] /dev/sdx2 Linux swap No More than 512 MiB
/ /dev/sdx3 Linux No Remainder of the device

SWAP Recommandations

Amount of RAM in the system Recommended swap space Recommended swap space if allowing for hibernation
⩽ 2GB 2 times the amount of RAM 3 times the amount of RAM
> 2GB – 8GB Equal to the amount of RAM 2 times the amount of RAM
> 8GB – 64GB At least 4 GB 1.5 times the amount of RAM
> 64GB At least 4 GB Hibernation not recommended

 

Resulting for our system in:

sda1 512MB [EFI System]
sda2 2GB [Linux swap]
sda3 Remainder [Linux filesystem]
MAKE NOTE OF THE PARTUUID OF sda3, WE WILL NEED THIS LATER!
write – yes -quit

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda3
mkswap /dev/sda2
swapon /dev/sda2
mount /dev/sda3 /mnt
mkdir /mnt/boot
ount /dev/sda1 /mnt/boot
pacstrap -i /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash
nano /etc/locale.gen

uncomment these line
en_US.UTF8 UTF-8
CTRL + X , yes, enter

locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
hwclock --systohc --utc
echo arch-base > /etc/hostname
nano /etc/hosts

127.0.0.1 localhost.localdomain localhost arch-base
::1 localhost.localdomain localhost arch-base

pacman -S networkmanager
systemctl enable NetworkManager
mkinitcpio -p linux
bootctl install
nano /boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=********-****-****-****-************ rw

BE AWARE, USE LOWER CASE PARTUUID OF EARLIER NOTED PARTUUID, otherwisde it will not work!

passwd
umount /dev/sda3
exit
reboot

FASE 2

useradd -m -g users -G wheel,storage,power -s /bin/bash wouter
passwd wouter
EDITOR=nano visudo

remove # before
%wheel ALL=(ALL) ALL

pacman -S bash-completion
exit

FASE 3

Login as wouter!

sudo pacman -Syyu
sudo pacman -S reflector
sudo reflector -l 100 -f 50 -c NL -c BE -c DE --sort rate --threads 5 --verbose --save /tmp/mirrorlist.new
rankmirrors -n 0 /tmp/mirrorlist.new > /tmp/mirrorlist
sudo cp /tmp/mirrorlist /etc/pacman.d
sudo pacman -Syu 

FASE 4

Login as wouter!

sudo pacman -S openssh
systemctl start sshd.service
systemctl enable sshd.service

FASE 5 – Install nome

sudo pacman -Syyu
sudo pacman -S gdm gnome virtualbox-guest-utils
systemctl enable gdm.service
sudo reboot now

FASE 6 – Install yaourt

sudo pacman -S --needed base-devel git wget yajl
git clone https://aur.archlinux.org/package-query.git
cd package-query/
makepkg -si

cd ..
git clone https://aur.archlinux.org/yaourt.git
cd yaourt/
makepkg -si

cd ..
sudo rm -dR yaourt/ package-query/

FASE 7 – Install pamac

yaourt -S pamac-aur

Or we can keep it very simple end just install X

FASE 5

Login as wouter!

sudo pacman -S xorg-server xorg-xinit xf86-video-vesa xterm virtualbox-guest-utils
sudo gpasswd -a wouter video
sudo reboot

FASE 6

Login as wouter!

sudo systemctl edit getty@tty1
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM
sudo nano ~/.bash_profile
...
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec startx
fi
sudo reboot

FASE 6

Login as wouter!


Other usefull commands
To retrieve PARTUUID we can use:

blkid -s PARTUUID -o value /dev/sda3
sudo pacman -S 
 xorg-twm                 - simple window manager
 xorg-xclock              - clock
 xorg-apps                - toolts oa xrandx
 virtualbox-guest-utils   - virtalbox drivers
 xf86-video-nouveau       - opensource nvidia drivers

sudo pacman -S xfreerdp
xfreerdp /u:**** /p:**** /v:192.168.1.67 /f
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s