Skip to content

Instantly share code, notes, and snippets.

@walm
Last active October 17, 2021 19:46
Show Gist options
  • Save walm/cc28aefbd14091641ecdfab6b302de8c to your computer and use it in GitHub Desktop.
Save walm/cc28aefbd14091641ecdfab6b302de8c to your computer and use it in GitHub Desktop.
Arch Linux on VMWare

Install in VMWare

  1. Boot from ISO
  2. Keyboard: loadkeys sv-latin1
  3. Partitions boot, swap and root (home will use just use root)
     gdisk /dev/sda

     # create boot partition
     # >n
     # Nr >[Enter for default 1]
     # First sector >[Enter for default]
     # Size >+250M
     # HEX >[Enter for default 8300]
     #
     # create swap partition
     # >n
     # Nr >[Enter for default 2]
     # First section >[Enter for default]
     # Size >+2G
     # HEX >8200
     #
     # create root partition
     # >n
     # use default for everyting to fill out the disk :)
     #
     # view partitions before write
     # >p
     #
     # write partitions
     # >w
  1. Format partitions
     mkfs.ext4 /dev/sda1
     mkswap /dev/sda2
     mkfs.ext4 /dev/sda3
  1. Mount filesystem
     swapon /dev/sda2
     mount /dev/sda3 /mnt

     mkdir /mnt/boot
     mount /dev/sda1 /mnt/boot
  1. Install Arch
     pacstrap /mnt base base-devel linux linux-firmware
     genfstab -p /mnt >> /mnt/etc/fstab
     arch-chroot /mnt /bin/bash
     pacman -S vi dhcpcd
     vi /etc/locale.conf
       LANG="en_US.UTF-8"
     vi /etc/locale.gen
       # uncomment en_US.UTF-8 UTF-8
       # uncomment en_US ISO-8859-1
       # uncomment sv_SE.UTF-8 UTF-8
       # uncomment sv_SE ISO-8859-1
     locale-gen
     ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
     vi /etc/vconsole.conf
       KEYMAP=sv-latin1
     vi /etc/hostname
       # add a suitable hostname for the system, my main is HALXX
     vi /etc/hosts
       127.0.0.1 localhost
       127.0.0.1 halxx
  1. Install bootloader
     pacman -S syslinux gptfdisk
     syslinux-install_update -i -a -m
  1. Secure root passwd
  2. Reboot
     exit
     umount /mnt/boot
     umount /mnt
     reboot
  1. Base config
    # connect to internet
    dhcpcd

    # autostart on boot (use ifstat to get device name like ens33)
    systemctl enable dhcpcd@ens33.service

    # vmware tools
    pacman -S open-vm-tools
    systemctl enable vmtoolsd.service

    # add non-root user
    useradd -d /home/<username> -m <username>
    gpasswd -a <username> audio
    passwd <username>

    pacman -S sudo
    vi /etc/sudoers
      # below root ALL=(ALL) ALL
      <username> ALL=(ALL) ALL

    # firewall, allow only incoming ssh
    pacman -S ufw
    ufw allow 22
    systemctl enable ufw.service

    reboot
  1. User "basic" setup, login with created user account
     # utils
     sudo pacman -S curl git openssh tmux neovim htop

     # x (vmware)
     sudo pacman -S xf86-input-vmmouse xf86-video-vmware gtkmm

     # x environment
     sudo pacman -S xorg-server xorg-xinit mesa xorg-twm xterm

     cp /etc/X11/xinit/xinitrc ~/.xinitrc
     vi ~/.xinitrc
       # setxkbmap options:
       # lv3:lalt_switch = left Alt as AltGr
       # lv3:ralt_alt = right Alt as normal Alt (as it's default as AltGr)
       setxkbmap \
         -layout se \
         -model apple_laptop \
         -variant mac \
         -option lv3:lalt_switch \
         -option lv3:ralt_alt

       twm &
       exec xterm
     startx

Sound sudo pacman -S pulseaudio-alsa pulseaudio

Disable PC speaker echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf

  1. Apps

Install yay see https://github.com/Jguer/yay

 yay -S firefox-developer-edition ttf-dejavu herbstluftwm-git
 
 yay -S kitty fish pass
 
 # install everything easy.. use pamac
 yay -S pamac-all
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment