Skip to content

Instantly share code, notes, and snippets.

@peteyoung
Last active February 13, 2017 10:32

Revisions

  1. peteyoung revised this gist Dec 4, 2013. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -259,6 +259,19 @@ Setup to build/install AUR packages
    sudo pacman -Su fakeroot
    sudo pacman -Su binutils


    Install vim
    ------------
    ```bash
    sudo pacman -Su gvim
    ```
    Add the following to .bashrc
    ```bash
    export TERM=xterm-256color
    ```



    Install Fonts
    -------------
    * Xorg fonts
  2. peteyoung revised this gist Dec 4, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -172,9 +172,11 @@ Sound setup

    * Configure sound
    * bring up ALSA Mixer in terminal

    ```bash
    alsa-mixer
    ```

    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
  3. peteyoung revised this gist Dec 4, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -171,7 +171,10 @@ Sound setup
    * More info here: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmuting_the_channels

    * Configure sound
    * `alsa-mixer`
    * bring up ALSA Mixer in terminal
    ```bash
    alsa-mixer
    ```
    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
    @@ -226,6 +229,7 @@ passwd pete
    twm &
    exec xterm -geometry 30x30+0+0 -name login
    ```

    Update everything
    -----------------
    ```bash
  4. peteyoung revised this gist Dec 4, 2013. 1 changed file with 119 additions and 63 deletions.
    182 changes: 119 additions & 63 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -138,76 +138,76 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    reboot
    ```

    * Install the Guest Additions (VirtualBox)

    * Download at: https://wiki.archlinux.org/index.php/VirtualBox#Arch_Linux_guests
    ```bash
    pacman -S virtualbox-guest-utils
    modprobe -a vboxguest vboxsf vboxvideo
    ```
    ```bash
    vi /etc/modules-load.d/virtualbox.conf
    ```
    * Add the following to the above file
    <pre>
    vboxguest
    vboxsf
    vboxvideo
    </pre>

    * keep date and time in sync
    ```bash
    systemctl enable vboxservice.service
    systemctl start vboxservice.service
    ```

    * Sound setup

    * Install ALSA Utils
    ```bash
    pacman -S alsa-utils
    ```

    * More info here: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmuting_the_channels
    Install the Guest Additions (VirtualBox)
    ----------------------------------------
    * Download at: https://wiki.archlinux.org/index.php/VirtualBox#Arch_Linux_guests
    ```bash
    pacman -S virtualbox-guest-utils
    modprobe -a vboxguest vboxsf vboxvideo
    ```
    ```bash
    vi /etc/modules-load.d/virtualbox.conf
    ```
    * Add the following to the above file
    <pre>
    vboxguest
    vboxsf
    vboxvideo
    </pre>

    * Configure sound
    * `alsa-mixer`
    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
    * hit esc

    * Test sound
    ```bash
    speaker-test -c 2
    ```
    * keep date and time in sync
    ```bash
    systemctl enable vboxservice.service
    systemctl start vboxservice.service
    ```

    * Install X Windows
    Sound setup
    -----------
    * Install ALSA Utils
    ```bash
    pacman -S xorg-server xorg-server-utils xorg-xinit
    pacman -S xorg-twm xorg-xclock xterm
    pacman -S alsa-utils
    ```

    * Add User
    ```bash
    useradd -m -g users -s /bin/bash pete
    passwd pete
    ```
    * petu...

    * setup sudo

    * Based on: https://wiki.archlinux.org/index.php/Sudo
    ```bash
    pacman -S sudo
    visudo
    * More info here: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmuting_the_channels

    * Configure sound
    * `alsa-mixer`
    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
    * hit esc

    * Test sound
    ```bash
    speaker-test -c 2
    ```

    Install X Windows
    -----------------
    ```bash
    pacman -S xorg-server xorg-server-utils xorg-xinit
    pacman -S xorg-twm xorg-xclock xterm
    ```

    Add User
    --------
    ```bash
    useradd -m -g users -s /bin/bash pete
    passwd pete
    ```
    * petu...
    * setup sudo
    * Based on: https://wiki.archlinux.org/index.php/Sudo
    ```bash
    pacman -S sudo
    visudo
    ```
    * add the following in visudo
    ```bash
    pete ALL=(ALL) ALL
    ```
    * add the following in visudo
    ```bash
    pete ALL=(ALL) ALL
    ```
    * login as new user on another virtual terminal
    * login as new user on another virtual terminal
    * setup X for user

    @@ -226,5 +226,61 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    twm &
    exec xterm -geometry 30x30+0+0 -name login
    ```
    Update everything
    -----------------
    ```bash
    pacman -Syu
    ```

    Install xfce
    ------------
    Based on: https://wiki.archlinux.org/index.php/Xfce

    * Install xfce
    ```bash
    sudo pacman -S xfce4
    ```
    * hit enter to default to installing all packages
    * select mesa-libgl

    * test it
    ```bash
    startxfce4
    ```

    Setup to build/install AUR packages
    -----------------------------------
    sudo pacman -Su fakeroot
    sudo pacman -Su binutils

    Install Fonts
    -------------
    * Xorg fonts
    ```bash
    sudo pacman -Su xorg-fonts-type1
    ```

    * Google fonts
    ```bash
    curl "https://aur.archlinux.org/packages/tt/ttf-google-fonts-git/ttf-google-fonts-git.tar.gz" > ttf-google-fonts-git.tar.gz
    tar -xzvf ttf-google-fonts-git.tar.gz
    cd ttf-google-fonts-git
    makepkg -s
    sudo pacman -U ttf-google-fonts-git-20131111-1-any.pkg.tar.xz
    ```




    Installed
    ---------
    ```bash
    sudo pacman -Syu
    sudo pacman -Su emacs
    sudo pacman -Su git
    sudo pacman -Su firefox
    sudo pacman -Su openssh
    sudo pacman -Su net-tools
    sudo pacman -Su gvim
    ssh-keygen -t rsa -C "[email protected]"
    ```
  5. peteyoung revised this gist Dec 4, 2013. 1 changed file with 13 additions and 9 deletions.
    22 changes: 13 additions & 9 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -190,32 +190,36 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php

    * Add User
    ```bash
    useradd -m -g users -s /bin/bash pete
    useradd -m -g users -s /bin/bash pete
    passwd pete
    ```
    * petu...

    * setup sudo

    * Based on: https://wiki.archlinux.org/index.php/Sudo
    * ```bash
    ```bash
    pacman -S sudo
    visudo
    ```
    ```
    * add the following in visudo
    `pete ALL=(ALL) ALL`
    ```bash
    pete ALL=(ALL) ALL
    ```

    * login as new user on another virtual terminal

    * setup X for user

    * ```bash
    cp /etc/X11/xinit/xinitrc ~/.xinitrc
    vi ~/.xinitrc
    ```
    ```bash
    cp /etc/X11/xinit/xinitrc ~/.xinitrc
    vi ~/.xinitrc
    ```

    * Add the following line to the top of ~/.xinitrc above any exec options. This adds VirtualBox functionality to X so the vm window can be resized, etc.
    `/usr/bin/VBoxClient-all`
    ```bash
    /usr/bin/VBoxClient-all
    ```

    * change last few lines
    ```bash
  6. peteyoung revised this gist Dec 4, 2013. 1 changed file with 35 additions and 2 deletions.
    37 changes: 35 additions & 2 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -182,12 +182,45 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    speaker-test -c 2
    ```

    * X
    * Install X Windows
    ```bash
    pacman -S xorg-server xorg-server-utils xorg-xinit
    pacman -S xorg-twm xorg-xclock xterm
    ```


    * Add User
    ```bash
    useradd -m -g users -s /bin/bash pete
    passwd pete
    ```
    * petu...

    * setup sudo

    * Based on: https://wiki.archlinux.org/index.php/Sudo
    * ```bash
    pacman -S sudo
    visudo
    ```
    * add the following in visudo
    `pete ALL=(ALL) ALL`

    * login as new user on another virtual terminal

    * setup X for user

    * ```bash
    cp /etc/X11/xinit/xinitrc ~/.xinitrc
    vi ~/.xinitrc
    ```

    * Add the following line to the top of ~/.xinitrc above any exec options. This adds VirtualBox functionality to X so the vm window can be resized, etc.
    `/usr/bin/VBoxClient-all`

    * change last few lines
    ```bash
    twm &
    exec xterm -geometry 30x30+0+0 -name login
    ```


  7. peteyoung revised this gist Dec 4, 2013. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -149,11 +149,11 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    vi /etc/modules-load.d/virtualbox.conf
    ```
    * Add the following to the above file
    ```bash
    <pre>
    vboxguest
    vboxsf
    vboxvideo
    ```
    </pre>

    * keep date and time in sync
    ```bash
    @@ -171,9 +171,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    * More info here: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmuting_the_channels

    * Configure sound
    * ```bash
    alsa-mixer
    ```
    * `alsa-mixer`
    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
  8. peteyoung revised this gist Dec 4, 2013. 1 changed file with 58 additions and 1 deletion.
    59 changes: 58 additions & 1 deletion arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -131,7 +131,64 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ...
    </pre>


    * Unmount the partitions and reboot (remove media from virtual dvd)
    ```bash
    exit
    umount /mnt
    reboot
    ```

    * Install the Guest Additions (VirtualBox)

    * Download at: https://wiki.archlinux.org/index.php/VirtualBox#Arch_Linux_guests
    ```bash
    pacman -S virtualbox-guest-utils
    modprobe -a vboxguest vboxsf vboxvideo
    ```
    ```bash
    vi /etc/modules-load.d/virtualbox.conf
    ```
    * Add the following to the above file
    ```bash
    vboxguest
    vboxsf
    vboxvideo
    ```

    * keep date and time in sync
    ```bash
    systemctl enable vboxservice.service
    systemctl start vboxservice.service
    ```

    * Sound setup

    * Install ALSA Utils
    ```bash
    pacman -S alsa-utils
    ```

    * More info here: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmuting_the_channels

    * Configure sound
    * ```bash
    alsa-mixer
    ```
    * right and left arrows select channels
    * unmute Master and PCM channels (MM = mute, OO = open) by pressing "m"
    * run up volume all the way with up arrow
    * hit esc

    * Test sound
    ```bash
    speaker-test -c 2
    ```

    * X
    ```bash
    pacman -S xorg-server xorg-server-utils xorg-xinit
    pacman -S xorg-twm xorg-xclock xterm
    ```



  9. peteyoung revised this gist Dec 4, 2013. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -118,6 +118,18 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```
    * Above causes _"FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX"_ unless __gdisk__ is installed.

    * edit syslinux.cfg and change /dev/sda3 to /dev/sda1
    ```bash
    vi /boot/syslinux/syslinux.cfg
    ```

    <pre>
    ...
    LABEL arch
    ...
    APPEND root=/dev/sda1 ro
    ...
    </pre>



  10. peteyoung revised this gist Dec 4, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -116,7 +116,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    pacman -S gptfdisk syslinux
    syslinux-install_update -i -a -m
    ```
    * Above causes *"FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX"* unless gdisk is installed.
    * Above causes _"FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX"_ unless __gdisk__ is installed.



  11. peteyoung revised this gist Dec 4, 2013. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -101,17 +101,22 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```

    * Create an initial ramdisk environment
    ```bash
    mkinitcpio -p linux
    ```

    * Set the root password
    passwd (1 to 2)
    ```bash
    passwd
    ```
    * (1 to 2)

    * Install and configure a bootloader
    ```bash
    pacman -S gptfdisk syslinux
    syslinux-install_update -i -a -m
    ```
    * Above causes "FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX" unless gdisk is installed.
    * Above causes *"FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX"* unless gdisk is installed.



  12. peteyoung revised this gist Dec 4, 2013. 1 changed file with 25 additions and 0 deletions.
    25 changes: 25 additions & 0 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -88,6 +88,31 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    echo arch-vm > /etc/hostname
    ```

    * Configure the network (Wired using netctl)

    ```bash
    #systemctl enable dhcpcd.service
    systemctl enable [email protected]

    #cd /etc/netctl
    #cp examples/etherenet-static my-network
    #vi my-network # didn't need anything
    #netctl enable my-network
    ```

    * Create an initial ramdisk environment
    mkinitcpio -p linux

    * Set the root password
    passwd (1 to 2)

    * Install and configure a bootloader
    ```bash
    pacman -S gptfdisk syslinux
    syslinux-install_update -i -a -m
    ```
    * Above causes "FAILED to set attribute Legacy BIOS Bootable on /dev/sdaX" unless gdisk is installed.




  13. peteyoung revised this gist Dec 4, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"
    * un comment line with "en_US.UTF-8 UTF-8"

    ```bash
    echo LANG=en_US.UTF-8 > /etc/locale.conf
    @@ -73,7 +73,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```bash
    vi /etc/vconsole.conf
    ```
    Add FONT=Lat2-Terminus16
    * Add FONT=Lat2-Terminus16

    ```bash
    ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime
  14. peteyoung revised this gist Dec 4, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"
    * un comment line with "en_US.UTF-8 UTF-8"

    * test network
    ```bash
    @@ -26,7 +26,7 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```bash
    ip link
    ```
    copy down name of interface (enp0s3)
    * copy down name of interface (enp0s3)

    * partition drive
    ```bash
  15. peteyoung revised this gist Dec 4, 2013. 1 changed file with 59 additions and 16 deletions.
    75 changes: 59 additions & 16 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -12,15 +12,15 @@ Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php
    ```

    * set up locale
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"

    * test network
    ```bash
    ping -c 3 www.google.com
    ```
    ```bash
    ping -c 3 www.google.com
    ```

    * check interface
    ```bash
    @@ -29,21 +29,64 @@ ping -c 3 www.google.com
    copy down name of interface (enp0s3)

    * partition drive
    ```bash
    cgdisk /dev/sda
    ```
    ```bash
    cgdisk /dev/sda
    ```

    * format partition
    ```bash
    mkfs.ext4 /dev/sda1
    ```
    ```bash
    mkfs.ext4 /dev/sda1
    ```

    * mount partiton
    ```bash
    mount /dev/sda1 /mnt
    ```
    ```bash
    mount /dev/sda1 /mnt
    ```


    * install the base
    ```bash
    pacstrap -i /mnt base
    ```

    * Generate an fstab
    ```bash
    genfstab -U -p /mnt >> /mnt/etc/fstab
    vi /mnt/etc/fstab
    ```

    * Chroot and configure the base system
    ```bash
    arch-chroot /mnt /bin/bash
    ```

    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"

    ```bash
    echo LANG=en_US.UTF-8 > /etc/locale.conf
    export LANG=en_US.UTF-8
    ```

    ```bash
    vi /etc/vconsole.conf
    ```
    Add FONT=Lat2-Terminus16

    ```bash
    ln -s /usr/share/zoneinfo/CST6CDT /etc/localtime
    ```

    ```bash
    hwclock --systohc --utc
    ```

    * Hostname
    ```bash
    echo arch-vm > /etc/hostname
    ```



  16. peteyoung revised this gist Dec 4, 2013. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,9 @@ Beginner's Guide
    Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php/Beginners%27_Guide

    * set font
    ```bash
    setfont Lat2-Terminus16
    ```
    ```bash
    setfont Lat2-Terminus16
    ```

    * set up locale
    ```bash
    @@ -23,10 +23,10 @@ ping -c 3 www.google.com
    ```

    * check interface
    ```bash
    ip link
    ```
    * copy down name of interface (enp0s3)
    ```bash
    ip link
    ```
    copy down name of interface (enp0s3)

    * partition drive
    ```bash
  17. peteyoung revised this gist Dec 4, 2013. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -6,39 +6,39 @@ Beginner's Guide

    Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php/Beginners%27_Guide

    set font
    * set font
    ```bash
    setfont Lat2-Terminus16
    ```

    set up locale
    * set up locale
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"

    test network
    * test network
    ```bash
    ping -c 3 www.google.com
    ```

    check interface
    * check interface
    ```bash
    ip link
    ```
    copy down name of interface (enp0s3)
    * copy down name of interface (enp0s3)

    partition drive
    * partition drive
    ```bash
    cgdisk /dev/sda
    ```

    format partition
    * format partition
    ```bash
    mkfs.ext4 /dev/sda1
    ```

    mount partiton
    * mount partiton
    ```bash
    mount /dev/sda1 /mnt
    ```
  18. peteyoung created this gist Dec 4, 2013.
    53 changes: 53 additions & 0 deletions arch_linux_vm_setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    Arch Linux VM Setup
    ===================

    Beginner's Guide
    ----------------

    Following the steps found on the Arch wiki: https://wiki.archlinux.org/index.php/Beginners%27_Guide

    set font
    ```bash
    setfont Lat2-Terminus16
    ```

    set up locale
    ```bash
    vi /etc/locale.gen
    ```
    un comment line with "en_US.UTF-8 UTF-8"

    test network
    ```bash
    ping -c 3 www.google.com
    ```

    check interface
    ```bash
    ip link
    ```
    copy down name of interface (enp0s3)

    partition drive
    ```bash
    cgdisk /dev/sda
    ```

    format partition
    ```bash
    mkfs.ext4 /dev/sda1
    ```

    mount partiton
    ```bash
    mount /dev/sda1 /mnt
    ```