{ "created": "2015-12-28T11:19:04-06:00", "modified": "2022-06-13T18:23:48-05:00", "hierarchy": [ { "name": "ROOT", "type": "folder", "uri": "/ROOT" }, { "name": "ArchLinux Notes", "type": "article", "uri": "ArchLinux_Notes" } ], "html": "\n\n \n \n \n \n\n \n \n\n \n \n \n \n \n\n ArchLinux Notes\n\n \n \n \n \n
\n
\n \n
\n
\n \n \n\n

ArchLinux Notes

\n

[TOC]

\n

Notes from installing ArchLinux on VirtualBox to use as a development machine at work.

\n

Installation

\n
parted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n

Then do everything else the wiki asks you to do

\n

Configuration

\n

Time and Date

\n
timedatectl set-timezone America/Chicago\n
\n

Hostname

\n
hostnamectl set-hostname nikhil.io\n
\n

Add a normal user

\n

Who will be able to sudo and do things and set a password

\n
useradd -m -g wheel user\npasswd user\n
\n

Can always change the name of this user later with usermod. Then use visudo to enable the wheel group. You’ll see a lot of artifacts if you don’t set EDITOR first

\n
EDITOR=vim visudo\n
\n

Yoghurt

\n

Edit /etc/pacman.conf and add this

\n
[archlinuxfr]\nSigLevel = Never\nServer = http://repo.archlinux.fr/$arch\n
\n

Then,

\n
pacman -Sy yaourt\n
\n

Verbose Boot

\n

Modify GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub

\n

Framebuffer Resolution

\n

Edit /etc/default/grub:

\n
GRUB_GFXMODE=1024x768x32\n
\n

Then run grub-mkconfig -o /boot/grub/grub.cfg and reboot

\n

Firewall

\n

Adapted an old project\nand things work as expected. Don’t forget to enable the service

\n
systemctl enable iptables.service\n
\n

Network

\n

The pacman update will break networking due a\nbug that may have been fixed in\nsystemd v228 (as of this writing). Oh well.\nFor the interface you see in ip link (will start with “en”)

\n
systemctl enable dhcpcd@ens4.network\n
\n

Then enable the appropriate service and restart the node

\n
systemctl enable systemd-networkd\nreboot\n
\n

SSH

\n
pacman -S openssh\n
\n

Change default port in /etc/ssh/sshd_config and disable root login. Then\nenable the “spawn on demand” ssh.socket service\nand change the port to whatever you had earlier

\n
# systemctl edit sshd.socket\n[Socket]\nListenStream=12345\n
\n

Enable the service and reboot to test if you can SSH

\n
systemctl enable sshd.socket\nreboot\n
\n

VirtualBox Notes

\n

VirtualBox Guest Additions

\n
pacman -S virtualbox-guest-utils \\\n          virtualbox-guest-modules \\\n          virtualbox-guest-dkms \\\n          linux-headers\n
\n

This is without an LTS kernel since I couldn’t be bothered. After installation, enable the service

\n
systemctl enable vboxservice.service\n
\n

Edit /etc/modules-load.d/virtualbox.conf to add these

\n
vboxguest\nvboxsf\nvboxvideo\n
\n

“virtualbox kernel service is not running”

\n

Here’s the issue. Happened after a system update. Fixed with

\n
sudo pacman -Su linux-headers\n
\n

Cannot Initialize Multiple Displays

\n

Made sure that I had the latest versions of virtualbox-guest-* packages

\n
[root@orc home]# pacman -Q | grep virtual\nvirtualbox-guest-modules-arch 5.1.16-1\nvirtualbox-guest-utils 5.1.16-1\n
\n

Then made sure that I could see my display in the output of xrandr. Then realized that I had to go “View” → “Virtual Screen 2” → “Enable” in the VirtualBox menu and felt a tad silly :flushed:

\n

Resizing

\n

Can only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)

\n
cd C:\\Program Files\\Oracle\\VirtualBox\nVBoxManage.exe clonehd <path to VMDK> <path to VDI> --format vdi\n
\n

Then can resize

\n
VBoxManage.exe modifyhd <path to VDI> --resize 25600\n
\n

That’s 25,000 megabytes (25 x 1,024). Now resize all snapshots with that same size!

\n
VBoxManage.exe modifyhd <path to snapshot> --resize 25600\n
\n

Then boot up VM. parted above version 2.4 doesn’t allow you to resize although its man page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. fdisk works too.

\n

X11

\n

Installation

\n
pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n
\n

At this point, running startxfce4 should show you a desktop. Reboot.

\n

Starting

\n
cp /etc/X11/xinit/xinitrc ~/.xinitrc\necho -e "exec startxfce4" >> ~/.xinitrc\n
\n

Modify ~/.xinitrc to remove all the xterm, xclock and exec lines and add this

\n
exec startxfce4\n
\n

Now, startx should work!

\n

Install some extras

\n
yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n
\n

Compiz (Maybe)

\n

For Compiz,

\n
yaourt -S compiz\n
\n

To run compiz,

\n
compiz --replace ccp\n
\n

To get the Numix theme,

\n
gsettings set org.gnome.metacity theme theme-name\n
\n

Add that to “Session and Startup”. I had to kill it, not save the session, and log out. The default window manager is xfwm4.

\n

The Trash Can

\n
sudo pacman -S gvfs gamin\n
\n

Sound

\n
pacman -S alsa-firmware alsa-utils\nalsactl init\n
\n

Dock

\n

Lots of options, but I like Docky and Plank. Went with Plank. To see preferences,

\n
plank --preferences\n
\n

Configuration is kept in ~/.config/plank.

\n

NetworkManager

\n

A bit ‘heavy’ compared to netctl but I was tired of fighting with the corporate network.

\n
pacman -S networkmanager network-manager-applet xfce4-notifyd\n
\n

Enable the service (else you’ll get D-Bus errors when you run nm-applet)

\n
systemctl enable NetworkManager.service\nsystemctl start NetworkManager.service\n
\n

Reboot and log back in. You’ll find the network manager in Applications -> Settings -> Network Connections

\n

“AddScreen/ScreenInit failed for driver 0”

\n

Add iomem=relaxed to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. Then generate a new grub config and initramfs with

\n
grub-mkconfig -o /boot/grub/grub.cfg\n
\n

Windows Fonts

\n

From a Windows 7 system. Get them and rename so you can remove later if you’d like (for f in *; do mv $f "Win7-"$f; done)

\n
@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR "%MYSHARE%"\nECHO 1\nCOPY "%WINDIR%\\FONTS\\arial.ttf" "%MYSHARE%\\arial.ttf"\nCOPY "%WINDIR%\\FONTS\\arialbd.ttf" "%MYSHARE%\\arialbd.ttf"\nCOPY "%WINDIR%\\FONTS\\ariali.ttf" "%MYSHARE%\\ariali.ttf"\nCOPY "%WINDIR%\\FONTS\\arialbi.ttf" "%MYSHARE%\\arialbi.ttf"\nCOPY "%WINDIR%\\FONTS\\comic.ttf" "%MYSHARE%\\comic.ttf"\nCOPY "%WINDIR%\\FONTS\\comicbd.ttf" "%MYSHARE%\\comicbd.ttf"\nCOPY "%WINDIR%\\FONTS\\cour.ttf" "%MYSHARE%\\cour.ttf"\nCOPY "%WINDIR%\\FONTS\\courbd.ttf" "%MYSHARE%\\courbd.ttf"\nCOPY "%WINDIR%\\FONTS\\couri.ttf" "%MYSHARE%\\couri.ttf"\nCOPY "%WINDIR%\\FONTS\\courbi.ttf" "%MYSHARE%\\courbi.ttf"\nCOPY "%WINDIR%\\FONTS\\gabriola.ttf" "%MYSHARE%\\gabriola.ttf"\nCOPY "%WINDIR%\\FONTS\\georgia.ttf" "%MYSHARE%\\georgia.ttf"\nCOPY "%WINDIR%\\FONTS\\georgiab.ttf" "%MYSHARE%\\georgiab.ttf"\nCOPY "%WINDIR%\\FONTS\\georgiai.ttf" "%MYSHARE%\\georgiai.ttf"\nCOPY "%WINDIR%\\FONTS\\georgiaz.ttf" "%MYSHARE%\\georgiaz.ttf"\nCOPY "%WINDIR%\\FONTS\\impact.ttf" "%MYSHARE%\\impact.ttf"\nCOPY "%WINDIR%\\FONTS\\times.ttf" "%MYSHARE%\\times.ttf"\nCOPY "%WINDIR%\\FONTS\\timesbd.ttf" "%MYSHARE%\\timesbd.ttf"\nCOPY "%WINDIR%\\FONTS\\timesi.ttf" "%MYSHARE%\\timesi.ttf"\nCOPY "%WINDIR%\\FONTS\\timesbi.ttf" "%MYSHARE%\\timesbi.ttf"\nCOPY "%WINDIR%\\FONTS\\trebuc.ttf" "%MYSHARE%\\trebuc.ttf"\nCOPY "%WINDIR%\\FONTS\\trebucbd.ttf" "%MYSHARE%\\trebucbd.ttf"\nCOPY "%WINDIR%\\FONTS\\trebucit.ttf" "%MYSHARE%\\trebucit.ttf"\nCOPY "%WINDIR%\\FONTS\\trebucbi.ttf" "%MYSHARE%\\trebucbi.ttf"\nECHO 25\nCOPY "%WINDIR%\\FONTS\\verdana.ttf" "%MYSHARE%\\verdana.ttf"\nCOPY "%WINDIR%\\FONTS\\verdanab.ttf" "%MYSHARE%\\verdanab.ttf"\nCOPY "%WINDIR%\\FONTS\\verdanai.ttf" "%MYSHARE%\\verdanai.ttf"\nCOPY "%WINDIR%\\FONTS\\verdanaz.ttf" "%MYSHARE%\\verdanaz.ttf"\nCOPY "%WINDIR%\\FONTS\\webdings.ttf" "%MYSHARE%\\webdings.ttf"\nCOPY "%WINDIR%\\FONTS\\wingding.ttf" "%MYSHARE%\\wingding.ttf"\nCOPY "%WINDIR%\\FONTS\\sylfaen.ttf" "%MYSHARE%\\sylfaen.ttf"\nCOPY "%WINDIR%\\FONTS\\symbol.ttf" "%MYSHARE%\\symbol.ttf"\nCOPY "%WINDIR%\\FONTS\\calibri.ttf" "%MYSHARE%\\calibri.ttf"\nCOPY "%WINDIR%\\FONTS\\calibril.ttf" "%MYSHARE%\\calibril.ttf"\nCOPY "%WINDIR%\\FONTS\\calibrib.ttf" "%MYSHARE%\\calibrib.ttf"\nCOPY "%WINDIR%\\FONTS\\calibrii.ttf" "%MYSHARE%\\calibrii.ttf"\nCOPY "%WINDIR%\\FONTS\\calibrili.ttf" "%MYSHARE%\\calibrili.ttf"\nCOPY "%WINDIR%\\FONTS\\calibriz.ttf" "%MYSHARE%\\calibriz.ttf"\nCOPY "%WINDIR%\\FONTS\\cambria.ttc" "%MYSHARE%\\cambria.ttc"\nCOPY "%WINDIR%\\FONTS\\cambriab.ttf" "%MYSHARE%\\cambriab.ttf"\nCOPY "%WINDIR%\\FONTS\\cambriai.ttf" "%MYSHARE%\\cambriai.ttf"\nCOPY "%WINDIR%\\FONTS\\cambriaz.ttf" "%MYSHARE%\\cambriaz.ttf"\nCOPY "%WINDIR%\\FONTS\\candara.ttf" "%MYSHARE%\\candara.ttf"\nCOPY "%WINDIR%\\FONTS\\candarab.ttf" "%MYSHARE%\\candarab.ttf"\nCOPY "%WINDIR%\\FONTS\\candarai.ttf" "%MYSHARE%\\candarai.ttf"\nCOPY "%WINDIR%\\FONTS\\candaraz.ttf" "%MYSHARE%\\candaraz.ttf"\nCOPY "%WINDIR%\\FONTS\\consola.ttf" "%MYSHARE%\\consola.ttf"\nCOPY "%WINDIR%\\FONTS\\consolab.ttf" "%MYSHARE%\\consolab.ttf"\nECHO 49\nCOPY "%WINDIR%\\FONTS\\consolai.ttf" "%MYSHARE%\\consolai.ttf"\nCOPY "%WINDIR%\\FONTS\\consolaz.ttf" "%MYSHARE%\\consolaz.ttf"\nCOPY "%WINDIR%\\FONTS\\constan.ttf" "%MYSHARE%\\constan.ttf"\nCOPY "%WINDIR%\\FONTS\\constanb.ttf" "%MYSHARE%\\constanb.ttf"\nCOPY "%WINDIR%\\FONTS\\constani.ttf" "%MYSHARE%\\constani.ttf"\nCOPY "%WINDIR%\\FONTS\\constanz.ttf" "%MYSHARE%\\constanz.ttf"\nCOPY "%WINDIR%\\FONTS\\corbel.ttf" "%MYSHARE%\\corbel.ttf"\nCOPY "%WINDIR%\\FONTS\\corbelb.ttf" "%MYSHARE%\\corbelb.ttf"\nCOPY "%WINDIR%\\FONTS\\corbeli.ttf" "%MYSHARE%\\corbeli.ttf"\nCOPY "%WINDIR%\\FONTS\\corbelz.ttf" "%MYSHARE%\\corbelz.ttf"\nCOPY "%WINDIR%\\FONTS\\lucon.ttf" "%MYSHARE%\\lucon.ttf"\nCOPY "%WINDIR%\\FONTS\\ariblk.ttf" "%MYSHARE%\\ariblk.ttf"\nCOPY "%WINDIR%\\FONTS\\l_10646.ttf" "%MYSHARE%\\l_10646.ttf"\nCOPY "%WINDIR%\\FONTS\\micross.ttf" "%MYSHARE%\\micross.ttf"\nCOPY "%WINDIR%\\FONTS\\pala.ttf" "%MYSHARE%\\pala.ttf"\nCOPY "%WINDIR%\\FONTS\\palab.ttf" "%MYSHARE%\\palab.ttf"\nCOPY "%WINDIR%\\FONTS\\palai.ttf" "%MYSHARE%\\palai.ttf"\nCOPY "%WINDIR%\\FONTS\\palabi.ttf" "%MYSHARE%\\palabi.ttf"\nCOPY "%WINDIR%\\FONTS\\tahoma.ttf" "%MYSHARE%\\tahoma.ttf"\nCOPY "%WINDIR%\\FONTS\\tahomabd.ttf" "%MYSHARE%\\tahomabd.ttf"\nCOPY "%WINDIR%\\FONTS\\framd.ttf" "%MYSHARE%\\framd.ttf"\nCOPY "%WINDIR%\\FONTS\\framdit.ttf" "%MYSHARE%\\framdit.ttf"\nCOPY "%WINDIR%\\FONTS\\segoepr.ttf" "%MYSHARE%\\segoepr.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeprb.ttf" "%MYSHARE%\\segoeprb.ttf"\nECHO 73\nCOPY "%WINDIR%\\FONTS\\segoesc.ttf" "%MYSHARE%\\segoesc.ttf"\nCOPY "%WINDIR%\\FONTS\\segoescb.ttf" "%MYSHARE%\\segoescb.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeui.ttf" "%MYSHARE%\\segoeui.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeuib.ttf" "%MYSHARE%\\segoeuib.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeuii.ttf" "%MYSHARE%\\segoeuii.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeuil.ttf" "%MYSHARE%\\segoeuil.ttf"\nCOPY "%WINDIR%\\FONTS\\segoeuiz.ttf" "%MYSHARE%\\segoeuiz.ttf"\nCOPY "%WINDIR%\\FONTS\\seguisb.ttf" "%MYSHARE%\\seguisb.ttf"\nCOPY "%WINDIR%\\FONTS\\seguisym.ttf" "%MYSHARE%\\seguisym.ttf"\nPAUSE\n

Other Stuff

\n

Compacting VDI Images

\n

You’ll need zerofree. It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. /mnt/vm) as read-only and zerofree it

\n
mount -o ro /dev/sda2 /mnt/vm\nzerofree /dev/sda2\n
\n

Now shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)

\n
cd "C:\\Program Files\\Oracle\\VirtualBox"\nVBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n
\n

Dropbox

\n

Install both the dropbox and dropbox-cli packages with yaourt. Some useful commands

\n
# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n

CA Certificates

\n

Copy certificates in PEM format and ending with a .pem extension to /etc/ssl/certs. Then, as root, run update-ca-trust.

\n

Google Chrome didn’t seem to depend on the system store.

\n

Emoji

\n

Either install ttf-symbola or emojione-color-font

\n

Adding Mirrors

\n

reflector will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can do this\nonline as well.

\n

/tmp size

\n

This is set to a small, fixed size which is a good\nthing. To install stuff, read the docs about\nsome way to set the temporary folder. For example, pyenv allows you to\nexport $TMPDIR before installation. I use /var/tmp

\n
TMPDIR=/var/tmp pyenv install 3.5.1\n
\n

However, this can be a little annoying. systemd is the one that creates this\nmount (since I couldn’t find it in /etc/fstab… since I created it myself\nwith genfstab!) with this

\n
/usr/lib/systemd/system/tmp.mount\n
\n

One option would be to rename. A better one would be to simply mask it

\n
systemctl mask tmp.mount\n
\n

Setting /tmp to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for /tmp.

\n

Pacman and GPG Proxies

\n

Corporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify /etc/pacman.d/gnupg/gpg.conf and modify the\nkeyserver to hkps://hkps.pool.sks-keyservers.net:443

\n

Key could not be looked up remotely

\n
sudo mv -v /etc/pacman.d/gnupg{,.bak}\nsudo mv -v /root/.gnupg{,.bak}\nsudo gpg --refresh-keys\nsudo pacman-key --refresh-keys\n
\n\n
\n \n
\n \n \n \n \n \n\n", "id": "4ebb9bc5-21c5-58ed-b7b3-e5c9163ceee6", "untracked": false, "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2022-06-13T18:23:48-05:00", "id": "6be928c4c8de048934c03e3c61539c9ceec7d59a", "shortId": "6be928c4", "subject": "Update config.yml", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Cannot Initialize Multiple Displays\n\nMade sure that I had the latest versions of `virtualbox-guest-*` packages\n\n [root@orc home]# pacman -Q | grep virtual\n virtualbox-guest-modules-arch 5.1.16-1\n virtualbox-guest-utils 5.1.16-1\n\nThen made sure that I could see my display in the output of `xrandr`. Then realized that I had to go \"View\" → \"Virtual Screen 2\" → \"Enable\" in the VirtualBox menu and felt a tad silly :flushed:\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkps://hkps.pool.sks-keyservers.net:443`\n\n### Key could not be looked up remotely\n\n```bash\nsudo mv -v /etc/pacman.d/gnupg{,.bak}\nsudo mv -v /root/.gnupg{,.bak}\nsudo gpg --refresh-keys\nsudo pacman-key --refresh-keys\n```\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2017-10-23T15:46:52-05:00", "id": "88f5e35c1cc76f4ff82c9e0db08d5b0665f9354b", "shortId": "88f5e35c", "subject": "Change keyserver", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Cannot Initialize Multiple Displays\n\nMade sure that I had the latest versions of `virtualbox-guest-*` packages\n\n [root@orc home]# pacman -Q | grep virtual\n virtualbox-guest-modules-arch 5.1.16-1\n virtualbox-guest-utils 5.1.16-1\n\nThen made sure that I could see my display in the output of `xrandr`. Then realized that I had to go \"View\" → \"Virtual Screen 2\" → \"Enable\" in the VirtualBox menu and felt a tad silly :flushed:\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkps://hkps.pool.sks-keyservers.net:443`\n\n### Key could not be looked up remotely\n\n```bash\nsudo mv -v /etc/pacman.d/gnupg{,.bak}\nsudo mv -v /root/.gnupg{,.bak}\nsudo gpg --refresh-keys\nsudo pacman-key --refresh-keys\n```\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2017-10-23T15:37:41-05:00", "id": "f6fd3fa8fdee3a5697e4058358e15ea4ab549652", "shortId": "f6fd3fa8", "subject": "Key could not be looked up remotely", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Cannot Initialize Multiple Displays\n\nMade sure that I had the latest versions of `virtualbox-guest-*` packages\n\n [root@orc home]# pacman -Q | grep virtual\n virtualbox-guest-modules-arch 5.1.16-1\n virtualbox-guest-utils 5.1.16-1\n\nThen made sure that I could see my display in the output of `xrandr`. Then realized that I had to go \"View\" → \"Virtual Screen 2\" → \"Enable\" in the VirtualBox menu and felt a tad silly :flushed:\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkp://keyserver.kjsl.com:80`\n\n### Key could not be looked up remotely\n\n```bash\nsudo mv -v /etc/pacman.d/gnupg{,.bak}\nsudo mv -v /root/.gnupg{,.bak}\nsudo gpg --refresh-keys\nsudo pacman-key --refresh-keys\n```\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2017-03-20T10:58:03-05:00", "id": "c358da19c9a0d231dc1d567ebe69bfba0a0bac0b", "shortId": "c358da19", "subject": "Add notes on multiple displays", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Cannot Initialize Multiple Displays\n\nMade sure that I had the latest versions of `virtualbox-guest-*` packages\n\n [root@orc home]# pacman -Q | grep virtual\n virtualbox-guest-modules-arch 5.1.16-1\n virtualbox-guest-utils 5.1.16-1\n\nThen made sure that I could see my display in the output of `xrandr`. Then realized that I had to go \"View\" → \"Virtual Screen 2\" → \"Enable\" in the VirtualBox menu and felt a tad silly :flushed:\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkp://keyserver.kjsl.com:80`\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2017-03-10T08:59:24-06:00", "id": "19ee7d94ca226826029e932aa1f0f00440a68b86", "shortId": "19ee7d94", "subject": "Update resizing instructions", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkp://keyserver.kjsl.com:80`\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2017-01-11T16:10:17-06:00", "id": "52bc5520274b68355426e835075c6437ad3d3279", "shortId": "52bc5520", "subject": "Add note on corporate proxy and GPG", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25000\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkp://keyserver.kjsl.com:80`\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-12-05T11:37:25-06:00", "id": "36979b447d6f61b938746479b23ca47d06c175a7", "shortId": "36979b44", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25000\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-06-20T11:54:24-05:00", "id": "fd76eeec9bd290859cbd2e6d16af93412950a179", "shortId": "fd76eeec", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file\n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP)\nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25000\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-05-28T14:25:27-05:00", "id": "5ef019b478a9666cd79816a23c8b0aa8c5b492df", "shortId": "5ef019b4", "subject": "Reorganize", "content": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Guest Additions\n--------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox \n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-05-18T12:54:48-05:00", "id": "da9057ef4d79abea245a0537403168e1a54793b1", "shortId": "da9057ef", "subject": "Add note on emojione-color-font", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nEmoji\n-----\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n\nFramebuffer Resolution\n----------------------\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n---\n\nOld [Linode](http://linode.com) Notes\n-------------------------------------\n\n### Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n### Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\n`Package Management`\n--------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-05-12T11:09:27-05:00", "id": "e9ec82169a1b912a2471522d22025b755f2ad4a3", "shortId": "e9ec8216", "subject": "Add framebuffer section", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nUnicode in Terminal\n-------------------\n\n```\nyaourt -S ttf-symbola\n```\n\nFramebuffer Resolution\n----------------------\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n---\n\nOld [Linode](http://linode.com) Notes\n-------------------------------------\n\n### Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n### Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\n`Package Management`\n--------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-05-12T10:08:36-05:00", "id": "8196189a1c4b266955942df601b525cfc4662d71", "shortId": "8196189a", "subject": "Add symbola install", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nUnicode in Terminal\n-------------------\n\n```\nyaourt -S ttf-symbola\n```\n\n\n---\n\nOld [Linode](http://linode.com) Notes\n-------------------------------------\n\n### Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n### Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\n`Package Management`\n--------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-04-21T11:32:37-05:00", "id": "54d3cad51b309b6d1fb6b2cdfb4340abcf3e75e6", "shortId": "54d3cad5", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\n---\n\nOld [Linode](http://linode.com) Notes\n-------------------------------------\n\n### Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n### Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\n`Package Management`\n--------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2016-04-07T12:37:28-05:00", "id": "cbdcfe34509663dd0a8c926ce0c7b6fa0cacb32d", "shortId": "cbdcfe34", "subject": "Reorg\n", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\n---\n\nOld [Linode](http://linode.com) Notes\n-------------------------------------\n\n### Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n### Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n### Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\n`Package Management`\n--------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2016-04-07T12:33:51-05:00", "id": "3bf51f0ba760631f5e538e287652815dbe8d85c7", "shortId": "3bf51f0b", "subject": "Add notes on compacting images\n", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nCompacting VDI Images\n---------------------\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\n---\n\n[Linode](http://linode.com) Notes\n---------------------------------\n\n## Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n## Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n## Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n## Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n`Package Management` and other stuff\n------------------------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-03-22T16:27:30-05:00", "id": "dbc178e8b00c1830bcd42ac3cfda4c381d727d11", "shortId": "dbc178e8", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -S linux-headers\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\n---\n\n[Linode](http://linode.com) Notes\n---------------------------------\n\n## Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n## Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n## Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n## Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n`Package Management` and other stuff\n------------------------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-02-19T13:43:42-06:00", "id": "b61313f972045ca3f68cea2a53f17468c9aa2ed2", "shortId": "b61313f9", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\nWindows Fonts\n-------------\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\n---\n\n[Linode](http://linode.com) Notes\n---------------------------------\n\n## Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n## Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n## Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n## Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n`Package Management` and other stuff\n------------------------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "anand.nikhil@gmail.com", "authorName": "Nikhil Anand", "date": "2016-02-18T14:30:27-06:00", "id": "8daaab089a99fb2adf5c4822dfd9008fe87ac8b7", "shortId": "8daaab08", "subject": "Update ArchLinux Notes.md", "content": "[TOC]\n\nNotes from installing the awesome ArchLinux on VirtualBox to use as a development machine at work.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nInstall VirtualBox Guest Additions\n----------------------------------\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest \n vboxsf\n vboxvideo\n\nInstall X11 and Xfce4\n---------------------\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\nStarting X\n----------\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\nAdd a normal user\n-----------------\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see a lot of artifacts if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\nYoghurt\n-------\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\nCompiz (Maybe)\n--------------\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\nThe Trash Can\n-------------\n\n sudo pacman -S gvfs gamin\n\nSound\n-----\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\nDock\n----\n\nLots of options, but I like Docky and Plank. Went with Plank. \n\nDropbox\n-------\n \nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\nNetworkManager\n--------------\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service \n systemctl start NetworkManager.service \n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\nVerbose Boot\n------------\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\nCA Certificates\n---------------\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n\n\n[Linode](http://linode.com) Notes\n---------------------------------\n\n## Separating out partitions\n\nI had separate disks for `/var` and `/var/log`. \n\n* Create a minimal system\n* Boot into *Rescue Mode* (that uses [Finnix](http://www.finnix.org/))\n* Mount the minimal system some place\n* Modify `/etc/fstab` on the system\n\n /dev/sda / ext4 rw,relatime,data=ordered 0 1\n /dev/sdb none swap defaults 0 0\n /dev/sdc /var ext4 rw,relatime,data=ordered 0 1\n /dev/sdd /var/log ext4 rw,relatime,data=ordered 0 1\n tmpfs /tmp tmpfs nodev,nosuid 0 0\n\n* `rsync` everything over from the minimal system's folders to the new disk\n* Delete folders from the minimal system\n* Shutdown the minimal system (`shutdown now`)\n* Make sure that the mounts are correctly mapped in your *Configuration Profile*\n* Boot up the minimal system\n\n## Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-\n devel` will fix this.\n\n## Network\n\nThe `pacman` update will break networking due [a \nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in \n`systemd` v228 (as of this writing). Oh well. The fix is easy. Create a file \n[like this](https://wiki.archlinux.org/index.php/Systemd-networkd#Wired_adapter_using_DHCP) \nfor the interface you see in `ip link` (will start with \"`en`\")\n\n # /etc/systemd/network/enp0s4.network\n [Match]\n Name=enp0s4\n\n [Network]\n DHCP=yes\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n## Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then \n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired\nnetworking was working at bootup. The Arch [beginner's\nguide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear\nand helpful.\n\nChose to create a very simple GPT partition scheme using `parted`.\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead.\nCreated\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables) \nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n`Package Management` and other stuff\n------------------------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get\nhere in a highly vetted way. [The\nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User Repository\n(AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) packages. The\nusual caveats of non-official sources apply here. To install anything, get a\n`PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which\nprovides a unified interface to `pacman` and the AUR. Install it like any\nother package\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv \naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well. \n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way.\n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see [a screen full of\n \"EOF\"\n messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\nReferences\n----------\n\n* [Using `journalctl`](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs)\n* Linode/Arch issues [1](https://bbs.archlinux.org/viewtopic.php?id=184800), [2](https://bbs.archlinux.org/viewtopic.php?id=183911)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-29T01:55:44-06:00", "id": "842b3f5223060711bbb7f89ac3bf7a69c7f613a0", "shortId": "842b3f52", "subject": "Add Linode and other notes\n", "content": "[TOC]\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired \nnetworking was working at bootup. The Arch [beginner's guide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear and helpful.\n\nChose to create a very simple GPT partition scheme using `parted`. \n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead. Created \n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old \nproject](https://github.com/afreeorange/iptables) and things work as expected.\n\nTime and Date\n-------------\n\n timedatectl set-timezone America/Chicago\n\nOr you could do the `/etc/localtime` symlink thing...\n\n`Package Management` and other stuff\n------------------------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get \nhere in a highly vetted way. [The \nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\nSome basic packages\n\n```bash\npacman -S ack bash-completion git htop libxml2 \\\n libxslt nginx openssh php-fpm postfix \\\n dovecot python rsync supervisor vim wget\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User \nRepository (AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) \npackages. The usual caveats of non-official sources apply here. To install \nanything, get a `PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which provides\na unified interface to `pacman` and the AUR. Install it like any other\npackage\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv\naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way. \n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see\n [a screen full of \"EOF\" messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good thing](http://superuser.com/a/619398).\nTo install stuff, read the docs about some way to set the temporary folder. For\nexample, `pyenv` allows you to export `$TMPDIR` before installation. I use\n`/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this \nmount (since I couldn't find it in `/etc/fstab`... since I *created* it \nmyself with `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and\nvery little memory), I resorted to creating a 5-10GiB partition just\nfor `/tmp`.\n\nLinode Notes\n------------\n\n## Packages\n\n* Run `pacman -Syu` first!\n* The `base-devel` collection isn't installed. A simple `pacman -S base-devel`\n will fix this.\n\n### Network\n\nOn Linode, after a `pacman -Syu`, network stopped working. Had to update\n`/etc/systemd/network/05-eth0.network` with the name of the adapter from\n`ip link` and then\n\n systemctl enable systemd-networkd\n systemctl restart systemd-networkd\n\n### \"Dependency failed for dhcpcd on eth0.\"\n\nReally weird.\n\n systemctl enable dhcpcd.service\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-28T11:19:04-06:00", "id": "6c106241f87009231d10ec7d2bee6d8fbc3b4cfe", "shortId": "6c106241", "subject": "Add Archlinux notes\n", "content": "[TOC]\n\nInstallation\n------------\n\n[Downloaded](https://www.archlinux.org/download/) the ISO (`2015.12.01`) and\nset up an \"Other 64-bit\" VM in VMWware Fusion 8 on OS X El Capitan. Wired \nnetworking was working at bootup. The Arch [beginner's guide](https://wiki.archlinux.org/index.php/Beginners%27_guide) was very clear and helpful.\n\nChose to create a very simple GPT partition scheme using `parted`. \n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel gpt\n\n# Create a 512GiB EPI System Partition (ESP)\nmkpart ESP fat32 1MiB 513MiB\n\n# Make it bootable\nset 1 boot on\n\n# Create 2GiB swap\nmkpart primary linux-swap 513GiB 2513GiB\n\n# Use the rest for root\nmkpart primary ext4 2513GiB 100%\n```\n\nThis did not work :( the VM was unable to boot up. Tried BIOS/MBR instead. Created \n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n```\n\nFirewall\n--------\n\n[Adapted](/files/archlinux-firewall.txt) an [old \nproject](https://github.com/afreeorange/iptables) and things work as expected.\n\nPackage Management\n------------------\n\n### Official Repos\n\n`pacman` is meat and potatoes of package management from 'official' sources.\nLike CentOS/Red Hat, here's \"base\", \"extra\", and \"community\". Packages get \nhere in a highly vetted way. [The \nwiki](https://wiki.archlinux.org/index.php/Pacman) is a great handbook.\n\n```bash\n# Search for stuff\npacman -Ss node\n\n# Install stuff\npacman -S nodejs\n\n# Remove stuff and deps (if not needed by other stuff)\npacman -Rs nodejs\n\n# Clean cache\npacman -Scc\n\n# Upgrade whole system\npacman -Syu\n```\n\nSome basic packages\n\n```bash\npacman -S ack bash-completion git htop libxml2 \\\n libxslt nginx openssh php-fpm postfix \\\n dovecot python rsync supervisor vim wget\n```\n\n### Unofficial Repo\n\nFor *everything* else, there's the [Arch User \nRepository (AUR)](https://aur.archlinux.org/) which has nearly 30,000 (!) \npackages. The usual caveats of non-official sources apply here. To install \nanything, get a `PKGBUILD` file for the package, then\n\n```bash\n# Make the package with deps and remove them after successful build\nmakepkg -sr\n\n# Generates a .tar.xz file. Install with pacman\npacman -U package.tar.xz\n\n# Short form\nmakepkg -sri package.tar.xz\n```\n\n**Important**: You can't run any `makepkg` commands as `root`!\n\nAnd then there's [Yaourt](https://github.com/archlinuxfr/yaourt) which provides\na unified interface to `pacman` and the AUR. Install it like any other\npackage\n\n```bash\n# Be clean\nmkdir tmp && cd tmp\n\n# Install package-query as a dep\ncurl -o package-query https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query\nmakepkg -sri -p package-query\n\n# Install yaourt\ncurl -o yaourt https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt\nmakepkg -sri -p yaourt\n```\n\nAll done!\n\n```bash\n$ yaourt -Ss pyenv\naur/pyenv 20151222-1 [installed] (3)\n Simple Python version management\naur/pyenv-virtualenv 20151103-1 [installed] (0)\n pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)\n```\n\nOther Notes\n-----------\n\n* The Arch Wiki has pretty much everything I needed, written in a clear and\n concise way. \n* `genfstab` won't write the swap partition if you don't `swapon`!\n* Unset `GREP_OPTIONS` if you don't want to go insane with warnings...\n* Export `$EDITOR` when using `visudo` else you'll see\n [a screen full of \"EOF\" messages](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380).\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good thing](http://superuser.com/a/619398).\nTo install stuff, read the docs about some way to set the temporary folder. For\nexample, `pyenv` allows you to export `$TMPDIR` before installation. I use\n`/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this \nmount (since I couldn't find it in `/etc/fstab`... since I *created* it \nmyself with `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and\nvery little memory), I resorted to creating a 5-10GiB partition just\nfor `/tmp`.\n" } ], "sizeInBytes": 14173, "source": "[TOC]\n\nNotes from installing ArchLinux on VirtualBox to use as a development machine at work.\n\nInstallation\n------------\n\n```bash\nparted /dev/sda\n\n# Make a GPT partition table\nmklabel msdos\n\n# Create 2GiB swap\nmkpart primary linux-swap 1MiB 2GiB\n\n# Use the rest for root\nmkpart primary ext4 2GiB 100%\n\n# Make root bootable\nset 2 boot on\n\n# Ctrl+D to quit\n\n# Create swap\nmkswap /dev/sda1\nswapon /dev/sda1\n\n# Create filesystem\nmkfs.ext4 /dev/sda2\n\n# Mount\nmount /dev/sda2 /mnt\n\n# Boostrap\npacstrap -i /mnt base base-devel\n\n# Generate fstab\ngenfstab -U /mnt > /mnt/etc/fstab\n\n# Switch to the new filesystem!\narch-chroot /mnt /bin/bash\n```\n\nThen do everything else [the wiki asks you to do](https://wiki.archlinux.org/index.php/beginners'_guide#Locale)\n\nConfiguration\n-------------\n\n### Time and Date\n\n timedatectl set-timezone America/Chicago\n\n### Hostname\n\n hostnamectl set-hostname nikhil.io\n\n### Add a normal user\n\nWho will be able to `sudo` and do things and set a password\n\n useradd -m -g wheel user\n passwd user\n\nCan always change the name of this user later with `usermod`. Then use `visudo` to enable the `wheel` group. You'll see [a lot of artifacts](https://bbs.archlinux.org/viewtopic.php?pid=796380#p796380) if you don't set `EDITOR` first\n\n EDITOR=vim visudo\n\n### Yoghurt\n\nEdit `/etc/pacman.conf` and add this\n\n [archlinuxfr]\n SigLevel = Never\n Server = http://repo.archlinux.fr/$arch\n\nThen,\n\n pacman -Sy yaourt\n\n### Verbose Boot\n\nModify `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`\n\n### Framebuffer Resolution\n\nEdit `/etc/default/grub`:\n\n GRUB_GFXMODE=1024x768x32\n\nThen run `grub-mkconfig -o /boot/grub/grub.cfg` and reboot\n\n### Firewall\n\n[Adapted](/files/archlinux-firewall.txt) an [old project](https://github.com/afreeorange/iptables)\nand things work as expected. Don't forget to [enable the service](https://wiki.archlinux.org/index.php/Iptables#Configuration_and_usage)\n\n systemctl enable iptables.service\n\n### Network\n\nThe `pacman` update will break networking due [a\nbug](https://bugs.archlinux.org/task/41215) that may have been fixed in\n`systemd` v228 (as of this writing). Oh well. \nFor the interface you see in `ip link` (will start with \"`en`\")\n\n systemctl enable dhcpcd@ens4.network\n\nThen enable the appropriate service and restart the node\n\n systemctl enable systemd-networkd\n reboot\n\n### SSH\n\n pacman -S openssh\n\nChange default port in `/etc/ssh/sshd_config` and disable root login. Then\n[enable the \"spawn on demand\" `ssh.socket` service](https://wiki.archlinux.org/index.php/Secure_Shell#Daemon_management)\nand change the port to whatever you had earlier\n\n # systemctl edit sshd.socket\n [Socket]\n ListenStream=12345\n\nEnable the service and reboot to test if you can SSH\n\n systemctl enable sshd.socket\n reboot\n\nVirtualBox Notes\n----------------\n\n### VirtualBox Guest Additions\n\n pacman -S virtualbox-guest-utils \\\n virtualbox-guest-modules \\\n virtualbox-guest-dkms \\\n linux-headers\n\nThis is without an LTS kernel since I couldn't be bothered. After installation, enable the service\n\n systemctl enable vboxservice.service\n\nEdit `/etc/modules-load.d/virtualbox.conf` to add these\n\n vboxguest\n vboxsf\n vboxvideo\n\n### \"virtualbox kernel service is not running\"\n\n[Here's the issue](https://bugs.archlinux.org/task/40495). Happened after a system update. Fixed with\n\n sudo pacman -Su linux-headers\n\n### Cannot Initialize Multiple Displays\n\nMade sure that I had the latest versions of `virtualbox-guest-*` packages\n\n [root@orc home]# pacman -Q | grep virtual\n virtualbox-guest-modules-arch 5.1.16-1\n virtualbox-guest-utils 5.1.16-1\n\nThen made sure that I could see my display in the output of `xrandr`. Then realized that I had to go \"View\" → \"Virtual Screen 2\" → \"Enable\" in the VirtualBox menu and felt a tad silly :flushed:\n\n### Resizing\n\nCan only do this with VDIs and not VMDKs. To convert a VMDK (on Windows)\n\n cd C:\\Program Files\\Oracle\\VirtualBox\n VBoxManage.exe clonehd --format vdi\n\nThen can resize\n\n VBoxManage.exe modifyhd --resize 25600\n\nThat's 25,000 megabytes (25 x 1,024). Now _resize all snapshots_ with that same size! \n\n VBoxManage.exe modifyhd --resize 25600\n\nThen boot up VM. `parted` above version 2.4 [doesn't allow you to resize](https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations) although its `man` page lists it as an option :/ I used GParted instead to fill the rest of the partition and was a happy person. `fdisk` works too.\n\nX11\n---\n\n### Installation\n\n pacman -S xorg-server xorg-xinit xfce4 xfce4-goodies\n\nAt this point, running `startxfce4` should show you a desktop. Reboot.\n\n### Starting\n\n cp /etc/X11/xinit/xinitrc ~/.xinitrc\n echo -e \"exec startxfce4\" >> ~/.xinitrc\n\nModify `~/.xinitrc` to remove all the `xterm`, `xclock` and `exec` lines and add this\n\n exec startxfce4\n\nNow, `startx` should work!\n\nInstall some extras\n\n yaourt -S google-chrome numix-themes numix-circle-icon-theme-git ristretto evince2-light squeeze-git --noconfirm\n\n### Compiz (Maybe)\n\nFor Compiz,\n\n yaourt -S compiz\n\nTo run compiz,\n\n compiz --replace ccp\n\nTo get the [Numix theme](https://wiki.archlinux.org/index.php/Compiz_configuration#Window_decoration_themes),\n\n gsettings set org.gnome.metacity theme theme-name\n\nAdd that to \"Session and Startup\". I had to kill it, _not save the session_, and log out. The default window manager is `xfwm4`.\n\n### The Trash Can\n\n sudo pacman -S gvfs gamin\n\n### Sound\n\n pacman -S alsa-firmware alsa-utils\n alsactl init\n\n### Dock\n\nLots of options, but I like Docky and Plank. Went with Plank. To see preferences,\n\n plank --preferences\n\nConfiguration is kept in `~/.config/plank`.\n\n### NetworkManager\n\nA bit 'heavy' compared to `netctl` but I was tired of fighting with the corporate network.\n\n pacman -S networkmanager network-manager-applet xfce4-notifyd\n\nEnable the service (else you'll get D-Bus errors when you run `nm-applet`)\n\n systemctl enable NetworkManager.service\n systemctl start NetworkManager.service\n\nReboot and log back in. You'll find the network manager in Applications -> Settings -> Network Connections\n\n### \"AddScreen/ScreenInit failed for driver 0\"\n\nAdd `iomem=relaxed` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`. Then generate a new grub config and initramfs with\n\n grub-mkconfig -o /boot/grub/grub.cfg\n\n### Windows Fonts\n\nFrom a Windows 7 system. Get them and rename so you can remove later if you'd like (`for f in *; do mv $f \"Win7-\"$f; done`)\n\n```bash\n@ECHO OFF\nCLS\nSET MYSHARE=%USERPROFILE%\\Desktop\\TTFONTS-ttf-win7-fonts\nMKDIR \"%MYSHARE%\"\nECHO 1\nCOPY \"%WINDIR%\\FONTS\\arial.ttf\" \"%MYSHARE%\\arial.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbd.ttf\" \"%MYSHARE%\\arialbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariali.ttf\" \"%MYSHARE%\\ariali.ttf\"\nCOPY \"%WINDIR%\\FONTS\\arialbi.ttf\" \"%MYSHARE%\\arialbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comic.ttf\" \"%MYSHARE%\\comic.ttf\"\nCOPY \"%WINDIR%\\FONTS\\comicbd.ttf\" \"%MYSHARE%\\comicbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cour.ttf\" \"%MYSHARE%\\cour.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbd.ttf\" \"%MYSHARE%\\courbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\couri.ttf\" \"%MYSHARE%\\couri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\courbi.ttf\" \"%MYSHARE%\\courbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\gabriola.ttf\" \"%MYSHARE%\\gabriola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgia.ttf\" \"%MYSHARE%\\georgia.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiab.ttf\" \"%MYSHARE%\\georgiab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiai.ttf\" \"%MYSHARE%\\georgiai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\georgiaz.ttf\" \"%MYSHARE%\\georgiaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\impact.ttf\" \"%MYSHARE%\\impact.ttf\"\nCOPY \"%WINDIR%\\FONTS\\times.ttf\" \"%MYSHARE%\\times.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbd.ttf\" \"%MYSHARE%\\timesbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesi.ttf\" \"%MYSHARE%\\timesi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\timesbi.ttf\" \"%MYSHARE%\\timesbi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebuc.ttf\" \"%MYSHARE%\\trebuc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbd.ttf\" \"%MYSHARE%\\trebucbd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucit.ttf\" \"%MYSHARE%\\trebucit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\trebucbi.ttf\" \"%MYSHARE%\\trebucbi.ttf\"\nECHO 25\nCOPY \"%WINDIR%\\FONTS\\verdana.ttf\" \"%MYSHARE%\\verdana.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanab.ttf\" \"%MYSHARE%\\verdanab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanai.ttf\" \"%MYSHARE%\\verdanai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\verdanaz.ttf\" \"%MYSHARE%\\verdanaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\webdings.ttf\" \"%MYSHARE%\\webdings.ttf\"\nCOPY \"%WINDIR%\\FONTS\\wingding.ttf\" \"%MYSHARE%\\wingding.ttf\"\nCOPY \"%WINDIR%\\FONTS\\sylfaen.ttf\" \"%MYSHARE%\\sylfaen.ttf\"\nCOPY \"%WINDIR%\\FONTS\\symbol.ttf\" \"%MYSHARE%\\symbol.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibri.ttf\" \"%MYSHARE%\\calibri.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibril.ttf\" \"%MYSHARE%\\calibril.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrib.ttf\" \"%MYSHARE%\\calibrib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrii.ttf\" \"%MYSHARE%\\calibrii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibrili.ttf\" \"%MYSHARE%\\calibrili.ttf\"\nCOPY \"%WINDIR%\\FONTS\\calibriz.ttf\" \"%MYSHARE%\\calibriz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambria.ttc\" \"%MYSHARE%\\cambria.ttc\"\nCOPY \"%WINDIR%\\FONTS\\cambriab.ttf\" \"%MYSHARE%\\cambriab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriai.ttf\" \"%MYSHARE%\\cambriai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\cambriaz.ttf\" \"%MYSHARE%\\cambriaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candara.ttf\" \"%MYSHARE%\\candara.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarab.ttf\" \"%MYSHARE%\\candarab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candarai.ttf\" \"%MYSHARE%\\candarai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\candaraz.ttf\" \"%MYSHARE%\\candaraz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consola.ttf\" \"%MYSHARE%\\consola.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolab.ttf\" \"%MYSHARE%\\consolab.ttf\"\nECHO 49\nCOPY \"%WINDIR%\\FONTS\\consolai.ttf\" \"%MYSHARE%\\consolai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\consolaz.ttf\" \"%MYSHARE%\\consolaz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constan.ttf\" \"%MYSHARE%\\constan.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanb.ttf\" \"%MYSHARE%\\constanb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constani.ttf\" \"%MYSHARE%\\constani.ttf\"\nCOPY \"%WINDIR%\\FONTS\\constanz.ttf\" \"%MYSHARE%\\constanz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbel.ttf\" \"%MYSHARE%\\corbel.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelb.ttf\" \"%MYSHARE%\\corbelb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbeli.ttf\" \"%MYSHARE%\\corbeli.ttf\"\nCOPY \"%WINDIR%\\FONTS\\corbelz.ttf\" \"%MYSHARE%\\corbelz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\lucon.ttf\" \"%MYSHARE%\\lucon.ttf\"\nCOPY \"%WINDIR%\\FONTS\\ariblk.ttf\" \"%MYSHARE%\\ariblk.ttf\"\nCOPY \"%WINDIR%\\FONTS\\l_10646.ttf\" \"%MYSHARE%\\l_10646.ttf\"\nCOPY \"%WINDIR%\\FONTS\\micross.ttf\" \"%MYSHARE%\\micross.ttf\"\nCOPY \"%WINDIR%\\FONTS\\pala.ttf\" \"%MYSHARE%\\pala.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palab.ttf\" \"%MYSHARE%\\palab.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palai.ttf\" \"%MYSHARE%\\palai.ttf\"\nCOPY \"%WINDIR%\\FONTS\\palabi.ttf\" \"%MYSHARE%\\palabi.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahoma.ttf\" \"%MYSHARE%\\tahoma.ttf\"\nCOPY \"%WINDIR%\\FONTS\\tahomabd.ttf\" \"%MYSHARE%\\tahomabd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framd.ttf\" \"%MYSHARE%\\framd.ttf\"\nCOPY \"%WINDIR%\\FONTS\\framdit.ttf\" \"%MYSHARE%\\framdit.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoepr.ttf\" \"%MYSHARE%\\segoepr.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeprb.ttf\" \"%MYSHARE%\\segoeprb.ttf\"\nECHO 73\nCOPY \"%WINDIR%\\FONTS\\segoesc.ttf\" \"%MYSHARE%\\segoesc.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoescb.ttf\" \"%MYSHARE%\\segoescb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeui.ttf\" \"%MYSHARE%\\segoeui.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuib.ttf\" \"%MYSHARE%\\segoeuib.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuii.ttf\" \"%MYSHARE%\\segoeuii.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuil.ttf\" \"%MYSHARE%\\segoeuil.ttf\"\nCOPY \"%WINDIR%\\FONTS\\segoeuiz.ttf\" \"%MYSHARE%\\segoeuiz.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisb.ttf\" \"%MYSHARE%\\seguisb.ttf\"\nCOPY \"%WINDIR%\\FONTS\\seguisym.ttf\" \"%MYSHARE%\\seguisym.ttf\"\nPAUSE\n```\n\nOther Stuff\n-----------\n\n### Compacting VDI Images\n\nYou'll need [`zerofree`](https://frippery.org/uml/index.html). It works on ext4 filesystems as well. Install it on the VM, then reboot with an Arch LiveCD. Mount the system some place (e.g. `/mnt/vm`) as _read-only_ and zerofree it\n\n mount -o ro /dev/sda2 /mnt/vm\n zerofree /dev/sda2\n\nNow shutdown the VM (and remove the LiveCD). On the VirtualBox host (mine was Windows)\n\n cd \"C:\\Program Files\\Oracle\\VirtualBox\"\n VBoxManage.exe modifyhd c:\\path\\to\\thedisk.vdi --compact\n\n### Dropbox\n\nInstall both the `dropbox` and `dropbox-cli` packages with `yaourt`. Some useful commands\n\n```bash\n# Get to your folder\ncd ~/Dropbox\n\n# See the overall sync status\ndropbox-cli status\n\n# See file status\ndropbox-cli filestatus\n\n# Set a proxy\ndropbox-cli proxy manual http jhproxy1.phibred.com 8080\n```\n\n### CA Certificates\n\nCopy certificates in PEM format _and ending with a `.pem` extension_ to `/etc/ssl/certs`. Then, as root, run `update-ca-trust`.\n\nGoogle Chrome didn't seem to depend on the system store.\n\n### Emoji\n\nEither install `ttf-symbola` or [`emojione-color-font`](https://github.com/eosrei/emojione-color-font)\n\n### Adding Mirrors\n\n`reflector` will fetch the latest mirrors based on some criteria you provide\nit (e.g. I want HTTPS and IPv6 only.) You can [do this\nonline](https://www.archlinux.org/mirrorlist) as well.\n\n### `/tmp` size\n\nThis is set to a small, fixed size which is [a good\nthing](http://superuser.com/a/619398). To install stuff, read the docs about\nsome way to set the temporary folder. For example, `pyenv` allows you to\nexport `$TMPDIR` before installation. I use `/var/tmp`\n\n TMPDIR=/var/tmp pyenv install 3.5.1\n\nHowever, this can be a little annoying. `systemd` is the one that creates this\nmount (since I couldn't find it in `/etc/fstab`... since I *created* it myself\nwith `genfstab`!) with this\n\n /usr/lib/systemd/system/tmp.mount\n\nOne option would be to rename. A better one would be to simply mask it\n\n systemctl mask tmp.mount\n\nSetting `/tmp` to a fixed size is still good. But it seems to use half the\nRAM; with my VPS box, this is untenable. Since I get tons of storage (and very\nlittle memory), I resorted to creating a 5-10GiB partition just for `/tmp`.\n\n### Pacman and GPG Proxies\n\nCorporate proxy blocked port 11371 (the default) that Pacman used to get\nits keys. Had to modify `/etc/pacman.d/gnupg/gpg.conf` and modify the \n`keyserver` to `hkps://hkps.pool.sks-keyservers.net:443`\n\n### Key could not be looked up remotely\n\n```bash\nsudo mv -v /etc/pacman.d/gnupg{,.bak}\nsudo mv -v /root/.gnupg{,.bak}\nsudo gpg --refresh-keys\nsudo pacman-key --refresh-keys\n```\n", "title": "ArchLinux Notes", "uri": "/ArchLinux_Notes" }