#+SETUPFILE: ../../../template/level-2.org
#+TITLE: System Installs 2017-01-14
#+DATE: <2017-01-14 Sat 20:18>
#+AUTHOR: vaeringjar
#+EMAIL: vaeringjar@land
#+DESCRIPTION: Some notes on system installations for resharing. This will have updates as I see fit.
#+KEYWORDS: installs


* Brain Dump

Let us just think about laptops for the moment. Imagine a case when
you avoid messing with the built in hard drive or solid state file
systems. Visit a friend or family and just plan on using their
computer. As long as you can avoid pitfalls from DRM'ed hardware, just
bring along a flash stick and boot from it instead.

Some of these operations require root priveledges.

First gather your device using one of the following commands.

#+BEGIN_SRC bash
df -h
lsblk -io LABEL,NAME,TYPE,MODEL,SIZE,MOUNTPOINT,FSTYPE
#+END_SRC


If I often reuse the device, sometimes wiping out everything will prevent misconfigurations:

#+BEGIN_SRC bash
//try
sudo dd if=/dev/zero of=/dev/sdn bs=2048 count=32 && sync
//or
sudo dd if=/dev/zero of=/dev/sdn bs=2048 count=32 oflag=dsync
//or tangent
sudo time sh -c "dd if=/dev/zero of=/dev/sdn bs=8k count=2000000 && sync"
#+END_SRC


Then, replace the sdn device with the one you found.

#+BEGIN_SRC bash
dd bs=2048 status=progress if=~/foo.img of=/dev/sdn
#+END_SRC


The following link targets Raspberry Pi, but it works well for general advise.

[[http://elinux.org/RPi_Easy_SD_Card_Setup#Using_the_Linux_command_line][Use the command line to image flash media]]


* Packages

For me, I mostly use Debian with apt-get or synaptic.
I get my system up to speed with the following commands as root or with sudo.
Some of these install the default, so depending on the project,
I might change that and install a different package version.

#+BEGIN_SRC bash
apt-get install curl emacs emacs-goodies-el filezilla gimp git keepass2 p7zip-full pelican synaptic vlc whois
#+END_SRC


** Development

I often tend to not use this in my base system anymore:

#+BEGIN_SRC bash
apt-get install default-jdk php-cli php-sqlite3 sqlite3
#+END_SRC


** Et Cetera

Some packages that I use sometimes, but not always in my systems:

#+BEGIN_SRC bash
apt-get install composer gnome-disk-utility pidgin-otr syslinux-util
#+END_SRC


** Games

I used to consider myself a "gamer" but now I mostly just play this one:

#+BEGIN_SRC bash
apt-get install hedgewars
#+END_SRC


** VPN and Remote Connections

For most of my work, I usually end up connecting to a remote system at
some point. The following packages and command help take care of most
situations.

#+BEGIN_SRC bash
apt-get install openconnect remmina
#+END_SRC


I usually don't need this one anymore, but for reference:

#+BEGIN_SRC bash
apt-get install network-manager-openconnect
#+END_SRC


Accessing the VPN just requires the location and the username.

#+BEGIN_SRC bash
sudo openconnect https://domain.tld/ -u USERNAME
#+END_SRC



* Debian

In Debian, if running an appliance or console, I might do the
following to add a sudo user or disable energy saver settings:
[[https://wiki.debian.org/LightDM#Enable_autologin][
autologin]]:

#+BEGIN_SRC bash
sudo adduser $USERNAME sudo

xset s off
xset -dpms

emacs /etc/lightdm/lightdm.conf

//uncomment the following to lines in [SeatDefaults]
//and set the user
#autologin-user=$USERNAME
#autologin-user-timeout=0
#+END_SRC


** Backports

https://backports.debian.org/Instructions/


** TODO LDAP

#+BEGIN_SRC bash
ldap-utils
ldapsearch -H ldaps://LDAP.DOMAIN.TLD -x -LLL -b ou=SET-GROUP,dc=DOMAIN,dc=TLD givenName=NAME uid maillocaladdress
#+END_SRC


** TODO BSD helper packages

#+BEGIN_SRC bash
signify-openbsd hashalot
#+END_SRC


** TODO guix setup

https://www.gnu.org/software/guix/manual/html_node/Requirements.html


** TODO qemu setup

#+BEGIN_SRC bash
qemu-system-x86_64 -drive format=raw,file=someSystemHere.iso -boot d -m 512
#+END_SRC

** TODO yacy setup
