Maintenance reference: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 559: Line 559:
** sudo apt-get install sublime-text-installer
** sudo apt-get install sublime-text-installer
** git config --global core.editor "subl -n -w" # to use sublime with -n(ew window) and -w(ait for exit)
** git config --global core.editor "subl -n -w" # to use sublime with -n(ew window) and -w(ait for exit)
* install Node.js using the "Node.js Version Manager" nvm [https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server details]
* install Node.js (see below) then you can install npm packages rad-scripts and mah-haus
* install Java (see below), then you can add to the Java stack as needed: play, sbt, activator...
* run setup_for_dev.node.js to pull down all active dev repos (in progress)
* hipchat hipshat
sudo su
echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add -
apt-get update
apt-get install hipchat
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Ubuntu Node.js
|-
| * install Node.js using the "Node.js Version Manager" nvm [https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server details]
** find the [https://github.com/creationix/nvm/releases latest nvm version]
** find the [https://github.com/creationix/nvm/releases latest nvm version]
** curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
** curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
Line 571: Line 584:
*** also: You can create an .nvmrc file containing version number in the project root  
*** also: You can create an .nvmrc file containing version number in the project root  
directory and it will default to that version
directory and it will default to that version
* install Oracle JDK 8 (9 is scheduled for release in 2016)
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Ubuntu java
|-
| Install Oracle JDK 8 (9 is scheduled for release in 2016)
  su -
  su -
  add-apt-repository ppa:webupd8team/java
  add-apt-repository ppa:webupd8team/java
Line 582: Line 599:
  sudo subl /etc/environment
  sudo subl /etc/environment
  JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" # actually, use the path from above, of course
  JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" # actually, use the path from above, of course
* now you can add to the Java stack as needed: play, sbt, activator...
* run setup_for_dev.node.js to pull down all active dev repos (in progress)
* hipchat hipshat
sudo su
echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add -
apt-get update
apt-get install hipchat
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"

Revision as of 16:44, 16 March 2016

general
flash drives
Flash.png
  • Q OpenELEC boot 9/2015
  • L OS X Lion boot
  • W Raspberry Pi 2 (fully dedicated partitions)
  • A [Cara] 32GB Windows 10 multi-version boot disk (25GB free); dinosaur+...; she wants argo
  • C Ubuntu 15.10 desktop boot
  • B openelec
  • I Crucial M500 firmware flasher
  • S toshiba msdos
  • T tinywave 32GB lots of backups, star wars uncut
  • blue/white 32GB - GoPro!
  • U 8GB Ubuntu 15.10 Server 64-bit installer
  • Y 2GB old photos
  • red-on-black 1GB old msdos
  • blue-on-black 4GB old photos
  • D 2GB msdos found stuff
  • P ABB 125MB empty
  • X 4GB empty
  • R 2GB homecoming 2014 playlist
  • (returned) mellow mushroom GoT wolf 4GB need to add a 720p disney film!!
  • PNY 16GB from bill, get it back to him!!
master keyboard shortcuts map
from .i3/config:
       # ===============
       # MDM KEY SUMMARY
       # ===============
       # 2015/11/06 first version
       # 2015/11/18 added misc section
       #
       #       c-s-b   ssh bitpost
       #       c-s-c   term: copy
       #       c-s-d   dolphin
       #       c-s-e   eclipse
       #       c-s-g   browser
       #       c-s-j   eclipse: keys 
       #       c-s-k   edit this config file
       #       c-s-n   nautilus: new folder
       #       c-s-r   remote desktop
       #       c-s-s   subl, eclise, etc: save all
       #       c-s-t   thunderbird
       #       c-s-u   unity-control-center / control panel (win)
       #       c-s-v   term: paste
       #       c-s-x   term: cut
       #       c-s-y   next chromium window
       #       c-s-z   redo
       #       c-s-6   sync all
       #       c-s-7   sync config
       #       c-s-8   sync pa
       #       c-s-9   sync at
       #
       #       == try to sync i3 + windows (+ mac) ==
       #       W-r     run
       #       F4      kill window
       #       F5      refresh (many apps)
       #       W-arrow move window
       #       c-W-arr move to adjacent workspace
       #       a-#     go to workspace
       #
       #       == coordinate with... ==
       #       c-s-n   nautilus: new folder
       #       c-s-j   eclipse: keys 
       #       c-s-s   subl, eclise, etc: save all
       #       c-s-x   term: cut
       #       c-s-c   term: copy
       #       c-s-v   term: paste
       #       c-s--   browser: zoom out
       #       c--     browser: zoom out
       #       c-=     browser: zoom in
       #       c-s-+   browser: zoom in
       #       c-0     browser: reset zoom
       #       c-s-0   browser: reset zoom
       #       c-w     eclipse, chromium, nautilus, etc.: close tab/file
       #
       #       == dev (chrome/FF, eclipse, vs, etc) ==
       #       F1      eclipse: project explorer
       #       F2      go to bookmark
       #       c-F2    set bookmark
       #       F3      find next
       #       s-F3    find prev
       #       F6      debug
       #       F7      run
       #       F8      pause/resume
       #       F9      save and build
       #       F10     step over
       #       F11     step into
       #       s-F11   step out of
       #       F12     browser: dev tools; eclipse: console (errors)
       #       c-b     toggle breakpoint
       #
       #       == misc ==
       #       c-a-brk win remote desktop fullscreen toggle
script favs
COMMANDS WORTH REMEMBERING

My scripts:

sc                              show most-common quick-scripts
greplogs blah                   search all my log files (named ToDo.txt) for "blah"
greplogs blah -C 3              search all my log files (named ToDo.txt), and show 3 surrounding lines of context
grepcode blah -C 3              same, but search code files underneath the current dir (h|hpp|cpp|pl|php)
restart_process_as_needed.pl name=#path/file# 
                                checks for process named 'file'; if not found, starts path/file
pk substring                    prompt to kill all processes with 'substring'

General-purpose:

cp -axv drive drive_backup      clone an unmounted linux system
ps ax|grep blah                 show running processes with "blah" in them
lsof -c cp                      show open files for any process starting with "cp"
lspci                           list all the hardware using the PCI bus (video cards, etc)
watch #command#                 repeat the command every 2 secs (default), showing output
tail -f #logfile#               display the tail end of the logfile, in realtime
shutdown -rF now                reboot, forcing an fsck on startup (or, put a [forcefsck] file in drive root)
fuser -m /dev/hdb1              find open files on a drive, then processes that have the file(s) open
  /dev/hdb1: 538
ps auxw|grep 538
  donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox
wc -l file                      count lines - can pipe to it too
find / -name "libjpeg*"         brute-force find (in this case, all libraries starting with jpeg...)
iostat -dx 5                    report on drive % utilization etc ("emerge systat" to get it)
iotop                           top for io, of course
hdparm -t /dev/sda              tests actual speed of hard drive

Ubuntu-specific:

xrandr --output DVI-I-2 --off && xrandr --output DVI-I-2 --auto --right-of DVI-I-1     fixes lost monitor, also try arandr
sudo software-center [XXX.deb]                                                         to go to software center; specify a deb file to install (steam etc).
sudo unity-control-center                                                              all settings; also a pathway to upgrading and selecting nvidia driver
sudo lsb_release -a                                                                    display the ubuntu version

Gentoo-specific (see blog for USE flag notes):

elogviewer                      X app to list installed packages including installation notes
genlop -lu                      show the history of merged and unmerged packages
eix #search#                    search for all packages (available AND installed)
eix --world -c                  condensed list of all packages in your [world]
emerge -Davu blah               emerge package blah (if needed), confirming first
dispatch-conf                   handles updating of config files after emerge, see /etc/dispatch-conf.conf
equery uses #package#           show USE flags of package
equery depends #pkg#            show packages that depend on package
equery belongs #file#           show the package to which the file belongs
equery hasuse #flag#            shows packages that have the USE flag
equery depgraph --depth=# #pkg# shows the entire dependency tree for pkg
eix-sync                        grabs latest package list, updates portage and eix (usually called via cron)
emerge --emptytree --update world  CAREFUL, this reinstalls EVERYTHING :>

Apps:

alsamixer                       set 7.1-channel HD audio volume levels
alsa-config                     test, set optimal audio levels
mythfilldatabase                fill TV listings database

For development:

git rebase --hard HEAD          throw away your local changes that have not yet been committed
git rebase --hard master        force the current branch to match master (losing ALL commits!)
cvs history -c [file]           get list of revisions for [file]
cvs diff -r 1.2 [file]          compare past revision to current
cvs diff -r 1.3 -r 1.2 [file]   compare two revisions

Run sc to get the latest list:

-----------------------------------------------
/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\
-----------------------------------------------
          useful commands and scripts
_______________________________________________
\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/
 ---------------------------------------------

i3[scriptname]    run an i3-specific script
equery files pkg  show package files, use |less
elogv[iewer]      browse recent emerges and comments
edit_fluxbox_menu edit and apply fb menu changes
edit_firewall     edit, restart iptables w/screen
mdb-[]            access db tools
gtdm;gw;gd;gwa    go to tdm|wimpy|dune|wally via ssh
greplogs [term]   search logs for term [-C 3]
grepcode [term]   search code in curr dir for term
ds [dir]          get directory sizes
pk [proc_regex]   kill matches - type ALL for -9
lsof -c [proc]    show open files for process
which|whereis app show app location|paths
alsamixer         adjust sound levels
eq                finally an eq in linux, yay!
watch [command]   repeatedly run command
rs                restore screen (w/detach)
st;gt             search/get torrents
post_torrent      run from m@wimpy:rrip/flac (or mp3)
srd [#]           show most recent downloads
move_and_resymlink symlink destdir
resymlink symlink destdir (if file is already there)
rm_torrent.pl     torrent cleanup; run for usage
extract_tordir  extract dir from .torrent
ls_broken_symlinks uses curr dir
ls_nonsymlinks     uses curr dir
rm_broken_symlinks uses curr dir, WILL rm THEM
td;etd            show/edit active todo w/cvs
top               top resource-consuming procs
apachetop -f log  site-specific apache requests
ex;em             emacs with/without X
uc;cm             cvs update/commit (no message)
sp;ep             search/edit private data
edit_spam_[rules|settings]  what it says
edit_sieve_rules  edit mailfilter rules
tree -fid -L 1    great tree display of dir & files
edit_torrent_[]   shows (common) or rss (rare)
search_xbmc_keys  search key file for term
edit_world        edit portage master pkg list
xscreensaver-demo then select Disable to turn off
recordmydesktop   does what it says
bandwidth         monitor current bw usage
edit_rsync_jobs   edit bp<->tdm nightly rsync

trac-tda $1 $2    trac admin tool, RUN AS ROOT
erase_trac_ticket_block 17 20 blah  (run as root)
update_ampache_tda update music catalog, RUN AS ROOT
edit_gentoo_grub_cfg set up gentoo kernels on 3-boot

htdj/*_scripts/push_release(.bat) 
get_ampache_official changes 
publish_hangthedj_ampache_module 
get_ampache_official changes 
cdh;huc;hcm;hpush scripts to manage hangthedj repos
                  also see scripts/git_* helpers
ec2-ubuntu-ssh    ssh to amazon ec2 server
mp3search         search (and optionally copy mp3s
Disabling xscreensaver
emacs ~/.xscreensaver
  timeout:	12:00:00    # the max timeout is 12 hours
crontab -e
  # So... I have .xscreensaver set to max delay (12 hours)
  # and I call this every ten hours to restart the idle timer.
  * */10 * * * /usr/bin/xscreensaver-command --deactivate >/dev/null
linux software raid [mdraid]
mdraid has not received the polish it needs to Just Work. It has serious flaws that after hours of learning, still leave you unsure and hanging and most likely bailing out of the entire process. But it is the best thing we have on the planet, so let’s distill it down to the essentials.
  • check S.M.A.R.T. data of drives – run tests and make sure they are completely healthy!
  • clean raid drives of superblock and partition data
   mdadm --misc --zero-superblock /dev/sdd && dd if=/dev/zero of=/dev/sdd bs=1M count=100 && mdadm --examine /dev/sdd
    mdadm: No md superblock detected on /dev/sdd.
  • use whole drives (not drive partitions) in a newly created raid
   mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdd /dev/sde 
    mdadm: size set to 3906887488K 
    mdadm: automatically enabling write-intent bitmap on large array 
    Continue creating array? yes 
    mdadm: Defaulting to version 1.2 metadata 
    mdadm: array /dev/md0 started.
   watch -n 1 cat /proc/mdstat
   # wait 400 FUCKING MINUTES for a GODDAMNED EMPTY 4TB DRIVE to sync with ANOTHER empty 4TB drive, FUCKSAKE
   # IF YOU REBOOT BEFORE THAT, IT WILL BE AS IF YOU NEVER SET UP A RAID
  • save and reboot and make sure the mdraid service restores the raid
   mdadm --detail --scan >>/etc/mdadm.conf 
   rc-update add mdraid boot
   # start then stop then start the /etc/init.d/mdraid service, make sure this works to restore your raid (check /proc/mdstat) 
   # format /dev/md0 as ext4 and set up an auto mount point in /etc/fstab 
   # reboot and pray
  • hopefully much later, upon failure, to restore a single drive, set it up as a raid:
   madadm -A /dev/sdd # I THINK! it's all very iffy. Which SUCKS.
Test your drives - DO THIS OFTEN
Look at available tests:
smartctl -c /dev/sdf # to peek at available tests and how long they typically take to run

Short test:

smartctl -t short /dev/sdf
watch -n 3 smartctl -l selftest /dev/sdf # you won't see anything until it finishes, takes about 1 minute

Long test:

smartctl -t long /dev/sdf
watch -n 3 smartctl -l selftest /dev/sdf # takes about 5 minutes
Adding a new drive (with testing)
To add a new drive:
  1. ls /dev/sd* # and make note of what you have
  2. stuff the new drive in the SATA tower or plug it into a SATA socket
  3. ls /dev/sd* # you should now see something new, like [/dev/sdf]
  4. or do: cat /var/log/messages|grep sd # to see what it used
  5. fdisk looks good again...
fdisk /dev/sdg
p # to show what is there already, hopefully nothing
(d if needed to delete existing partitions)
n # new
  1 # partition 1
  <enter> # for default of 2048
  <enter> # for default, end of drive
  w # write and quit
  1. format: mkfs.ext4 -m 0 /dev/sdf1 # the [-m 0] is very important; without it, goofy ext4 wastes 5% "saved for root" wtf
  2. mount /dev/sdf1 /somewhere # make sure it looks good!
# install smartctl tools
smartctl -c /dev/sdf # to peek at available tests and how long they typically take to run
smartctl -t short /dev/sdf
watch -n 3 smartctl -l selftest /dev/sdf # until success, takes about 1 minute
# if you're feeling ambitious, rerun with [-t long]
  1. umount # we are NOT going to be manually mounting! we need to label the drive and put it in /etc/fstab
  2. e2label /dev/sdb1 box-type-sizename # what a stupid f'in name for that util
  3. emacs /etc/fstab - and put in an entry like this:
/dev/disk/by-label/box-type-sizename   /my-mount-location    ext4    noatime         0 2
  1. mount /my-mount-location # now it will be there when you reboot! but do this to get it NOW :-)
  2. Note that if you mount the new drive under /spiceflow, samba will already be serving it up, whoop!
Adding a user to the server
su -
useradd #newuser# -m -G wheel(,etc)

# Other possibilities (likely not needed): 
## only needed if you want them to have their own group (otherwise use "users" group)
#groupadd #newuser#
## the additional groups here are optional
#useradd #newuser# -m -g #newuser# -G users,wheel,audio,video,games,dvd,usb -s /bin/bash
## Only needed if you didn't use [-m] option
#mkdir /home/#newuser#
#chown #newuser#:users /home/#newuser#

passwd #newuser#

# grant ssh access by adding to "AllowUsers"
em /etc/ssh/sshd_config
/etc/init.d/sshd restart

# grant samba access to home folder
# it's already set up in /etc/samba/smb.conf
# but the user must be manually added to samba
# use same pwd as before to sync them
smbpasswd -a #newuser#
/etc/init.d/samba restart

# YOU PROBABLY HAVE TO RESTART ANY STUPID WINDOWS BOX before it will see things correctly!  crazy
# you can try this in Windows but it didn't work for me:  
#  net use
#  net session \\samba.server.ip.address /delete
Check disk speed
To check SATA capability:
bitpost ~ # hdparm -I /dev/disk/by-label/reservoir-3g-mel |grep -i speed
          *    Gen1 signaling speed (1.5Gb/s)
          *    Gen2 signaling speed (3.0Gb/s)
          *    Gen3 signaling speed (6.0Gb/s)

To test read speed:

bitpost ~ # hdparm -tT /dev/disk/by-label/reservoir-3g-mel

/dev/disk/by-label/reservoir-3g-mel:
 Timing cached reads:   33760 MB in  2.00 seconds = 16900.70 MB/sec
 Timing buffered disk reads: 274 MB in  3.00 seconds =  91.28 MB/sec

You can use dd to check speed, too:

dd conv=fdatasync if=/dev/zero of=/spiceflow/newraid-4tb-bp/dd_test_output.dat bs=8k count=256k
 =256k
 262144+0 records in
 262144+0 records out
 2147483648 bytes (2.1 GB) copied, 4.57219 s, 470 MB/s
# don't forget to clean up..
rm /spiceflow/newraid-4tb-bp/dd_test_output.dat
Back up a linux system to a second bootable drive
Steps:
  1. We want to copy all files from the root drive to a new drive.
  2. We also want to update the boot menu to boot off the new drive.
  3. We also want to change /etc/fstab on the second drive to use the new root path.

These are the steps for backup of the dune box to the /spiceflow/2.0tb-newmovies/ drive. When we're done, we'll boot from that drive to prove we have a working standby system.

rsync does an excellent job of copying just what we need. Test it with this:

# a (archive mode -rlptgoD) v (verbose) x (don't cross filesystems) h (human-readable) n (dry run)
rsync -avxhn --progress / /spiceflow/2.0tb-newmovies/

Do the job with this:

rsync -avxh / /spiceflow/2.0tb-newmovies/

  sent 28.10G bytes  received 8.64M bytes  15.63M bytes/sec
  total size is 39.57G  speedup is 1.41

There was def some old stuff in there worth cleaning up:

/home/m/development/svn/mythtv...
/var/tmp
xbmc log files
etc

Next we fix /etc/fstab on the new drive to use the drive as root. Original config:

/dev/disk/by-label/d-g2-root        /                           ext3    noatime         0 1
/dev/disk/by-label/d-sp-20newmovies /spiceflow/2.0tb-newmovies  ext4    noatime         0 2

New config (remember tho, we lose the 2gb drive):

/dev/disk/by-label/d-g2-root        /root-hot-drive ext3    noatime         0 1
/dev/disk/by-label/d-sp-20newmovies /               ext4    noatime         0 2

Note: this never worked out for me due to my system's mix of ext3 and ext4. I'll retry once I migrate everything to ext4. Next, grub:

mount /boot
em /boot/grub/menu.lst

Orig entry:

title                                ----- linux-2.6.34-gentoo-r11_withext4
root (hd0,0)
kernel /boot/linux-2.6.34-gentoo-r11_withext4 root=/dev/sda4

Add a new "standby" entry under it - do a "df" to find the root:

title                                ----- ==STANDBY== linux-2.6.34-gentoo-r11_withext4 
root (hd0,0)
kernel /boot/linux-2.6.34-gentoo-r11_withext4 root=/dev/hda1

Then reboot to standby and see what we have... (no "latest" video library etc., but otherwise the same?)

Mount an IMG file
You have to peek at the file with fdisk:
fdisk -lu /home/m/bitpost/download/torrents/OpenELEC-Generic.x86_64-5.0.8-efi.img

From that you can tell the "units" and "Start" offsets:

Device                                                                    Start    End Sectors  Size Type
/home/m/bitpost/download/torrents/OpenELEC-Generic.x86_64-5.0.8-efi.img1   2048 526336  524289  256M Microsoft basic data
/home/m/bitpost/download/torrents/OpenELEC-Generic.x86_64-5.0.8-efi.img2 528384 593920   65537   32M Linux filesystem

From there you can mount with a little math. Multiply the units by Start to get offset (512x2048=1048576), and use it to mount that partition:

mount -t auto -o loop,offset=1048576 /home/m/bitpost/download/torrents/OpenELEC-Generic.x86_64-5.0.8-efi.img /media/m/iso

aifol

Ubuntu
Ubuntu 15.10 setup
Throw Ubuntu on a USB stick following ubuntu instructions.

Reboot, select to boot the thumb in BIOS, install, checking the [download as you go] and [install 3rd party stuff] boxes. Things to install ASAP:

  • (everything, then see more detailed notes, below)
sudo apt-get install i3 i3lock i3status suckless-tools dunst openssh-server cifs-utils smbclient synergy arandr ubuntu-restricted-extras exfat-fuse exfat-utils hfsprogs acpi gparted chromium-browser p7zip-full k4dirstat screen rxvt-unicode grdesktop openvpn bridge-utils nautilus-compare smartmontools git gimp
  • if ubuntu forced grub as the boot manager, download the refind zip file, unpack, and (re)run ./install.sh.
  • install i3
    • EITHER install i3 and i3 meta package through ubuntu: sudo software-center # then install i3 and i3 meta package
    • OR do it yourself: sudo apt-get install i3 i3lock i3status suckless-tools dunst
    • in .i3/config, set up nm-applet to run on login: exec --no-startup-id nm-applet
    • in .i3/config, set up synergy to run on login: exec --no-startup-id synergy
    • gsettings set org.gnome.desktop.background show-desktop-icons false # this disables the gnome desktop from opening when you run nautilus
    • then logout from unity and log back in to i3
    • sudo apt-get install urxvt # for a terminal that we can control (float, set geometry) with i3
  • nvidia drivers
    • open unity-control-panel AS ROOT: sudo unity-control-panel
    • select Sofware and Updates
    • select Additional Drivers tab, click nvidia (and Intel mobo, etc as needed) proprietary driver, Apply
  • set up ssh
sudo apt-get install openssh-server # default is ok but see /etc/ssh/sshd_config for details
cd ~m/.ssh
scp m@bitpost.com:/home/m/.ssh/authorized_keys .
scp m@bitpost.com:/home/m/.ssh/id_rsa_3072_nopswd .
ln -s id_rsa_3072_nopswd id_rsa
  • as root, create /root/samba_credentials (copy it from another machine)
  • set up scripts repo
git clone ssh://bitpost.com/home/m/development/scripts 
cd && ln -s development/scripts scripts
mkdir scripts/ubuntu/[new machine]
  • set up config repo (remember we need files in git and symlinks to them from the system, YES THIS SUCKS, GIT!)
verify_ubuntu_config_symlinks # we need to turn ALL THESE into SYMLINKS
mkdir development && cd development
git clone ssh://bitpost.com/home/m/development/config 
cd config
# DO ALL THE FOLLOWING AT ONCE or your system will be fubar
cp -r -p [wallee or whatever]/ubuntu [new machine]/ # be careful, this will need pruning/updating NOW
cd && ln -s /home/m/development/config/[new machine]/ubuntu config
cd && ln -s development/config/[new machine]/ubuntu/home/m/.bashrc .bashrc 
subl .bashrc # update PATH to include custom scripts folder in path
cd .i3 && mv config config.backup && ln -s /home/m/development/config/common/home/m/.i3/config config # and press Mod+Shift+C to reload
cd .gconf/apps/gnome-terminal/profiles/Default && mv %gconf.xml %gconf.xml.backup && ln -s /home/m/development/config/common/home/m/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml %gconf.xml
# fix up fstab as/if needed
su -
cd /etc
mv fstab /home/m/config/etc/fstab
ln -s fstab /home/m/config/etc/fstab
diff /etc/hosts /home/m/config/etc/hosts (most important: make sure correct hostname is being used)
mv hosts /home/m/config/etc/hosts
ln -s hosts /home/m/config/etc/hosts
verify_ubuntu_config_symlinks # ALL THESE should now be SYMLINKS
  • sudo apt-get install cifs-utils smbclient # and create /root/samba_credentials and all the samba /etc/fstab entries
  • sudo apt-get install synergy # and configure it
  • sudo apt-get install arandr # run to turn a monitor back on if it gets turned off during power cycling
  • sudo apt-get install ubuntu-restricted-extras # for mp3s in firefox, etc.
  • sudo apt-get install exfat-fuse exfat-utils # for access to modern exfat thumb drives (>4gb files)
  • sudo apt-get install hfsprogs # if you want to access osx volumes
  • sudo apt-get install acpi # for power management, so we can check battery level on laptop!
  • sudo apt-get install gparted chromium-browser p7zip-full k4dirstat screen # more good tools
  • sudo apt-get install nautilus-compare # then run nautilus-compare-preferences and pick kdiff3 for all
  • sudo apt-get install smartmontools # use to test drive health with [smartctl] - DO IT OFTEN
  • MAKE SURE to turn off stupid errors=mount in /etc/fstab if Ubuntu set it there
# MDM GOD DAMN IT UBUNTU STOP FUCKING AROUND WITH remount-ro
# UUID=6d51557a-1aaf-4594-8c28-f51a8730f63f   /   ext4    errors=remount-ro  0 1
UUID=6d51557a-1aaf-4594-8c28-f51a8730f63f     /   ext4    errors=continue    0 1
  • # download steam .deb file, [sudo software-center ~m/Downloads/.....deb]
  • # set up firefox sync, make sure adblock is installed, etc.
  • from a running terminal, set scrollback buffer to unlimited: Edit -> Profile Preferences -> Scrolling

AWS | OpenVPN | RemoteDesktop

  • sudo apt-get install grdesktop openvpn bridge-utils
  • get a set of OpenVPN certificate files
OpenVPN Desc OpenVPN files
Config file (e.g.) m.gec.poweranalytics.io.conf
User Certificate client.crt
CA Certificate ca.crt
Private Key client.key
  • start a terminal as root, and start a VPN session:
root@wallee:/home/m/development/power_analytics/docs/private/vpn/m.gec.poweranalytics.io-openvpn# openvpn --config m.gec.poweranalytics.io.conf 
  • This is available but more work, never bothered...
    • sudo unity-control-center
    • Click +, VPN, OpenVPN, Create... etc.

Development setup

  • # install android studio manually from zips into development folder
  • install eclipse
    • use the eclipse installer to install into development/eclipse folder (be careful not to install to eclipse/eclipse, if so just move and fix eclipse.ini)
    • put ~m/development/eclipse/eclipse.ini into config
    • run eclipse and create ~m/development/eclipse-workspace and select as default
    • use shared eclipse settings, to avoid problems like this.
    • see Development reference for Eclipse installation specifics
  • install boost, see Development reference
  • (everything)
sudo apt-get install emacs build-essential automake libtool libssl-dev libbz2-dev python-dev curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline kdiff3 sqlite3 sqlitebrowser
  • (or individually...)
  • sudo apt-get install emacs
  • sudo apt-get install build-essential automake libtool # for automake - build-essential may be there already
  • sudo apt-get install libssl-dev # to get autotools "-lssl" to work
  • sudo apt-get install libbz2-dev python-dev # used by boost
  • sudo apt-get install curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline # for php with curl (for etrade PHP SDK etc)
  • sudo apt-get install kdiff3 # will pull in a shit-ton of kde deps, i guess that's good
  • sudo apt-get install sqlite3 sqlitebrowser
  • sublime editor, WAY better than anything else out there on linux:
    • sudo add-apt-repository ppa:webupd8team/sublime-text-3
    • sudo apt-get update
    • sudo apt-get install sublime-text-installer
    • git config --global core.editor "subl -n -w" # to use sublime with -n(ew window) and -w(ait for exit)
  • install Node.js (see below) then you can install npm packages rad-scripts and mah-haus
  • install Java (see below), then you can add to the Java stack as needed: play, sbt, activator...
  • run setup_for_dev.node.js to pull down all active dev repos (in progress)
  • hipchat hipshat
sudo su
echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add -
apt-get update
apt-get install hipchat
Ubuntu Node.js
* install Node.js using the "Node.js Version Manager" nvm details
    • find the latest nvm version
    • curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
    • source ~/.profile
    • nvm ls-remote
    • nvm install 4.2.1
    • npm install -g express # to set the package manager to use a globally shared location
    • nvm alias default stable
    • (update .bashrc to configure node on even non-interactive shells - see another for example)
      • also: nvm use 4.2.1; node -v; nvm ls; nvm alias default 0.11.13; nvm use default
      • also: You can create an .nvmrc file containing version number in the project root

directory and it will default to that version

Ubuntu java
Install Oracle JDK 8 (9 is scheduled for release in 2016)
su -
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
    • ctrl-D (back to user)
update-alternatives --config java # make note of path
update-alternatives --config javac # make note of path
sudo subl /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" # actually, use the path from above, of course
Ubuntu i3 keybinding favs
See config/wimpy/home/m/.i3/config - clone it! TODO move to common
Ubuntu and shitty Seiki
AMD

Radeon driver sucks, won't go over 1080p; and Dune (AMD chipset) overscans so you can't see the edge. The only fix I found was to use xrandr. It kinda sucks though bc it's a resize solution that blurs all pixels. Cest la vie.

xrandr --output HDMI-0 --set underscan on
xrandr --output HDMI-0 --set "underscan hborder" 40 --set "underscan vborder" 22

Let's try the binary ATI driver.

lspci -vvnn | grep VGA
[...] Advanced Micro Devices, Inc. [AMD/ATI] RS780 [Radeon HD 3200] [1002:9610]
nvidia

For 4k video on an nvdia chipset (like wimpy), first get Ubuntu to use nvidia's driver:

  • Go to System Settings-> Software & Updates
  • Select the Additional Drivers tab
  • Select the tested, proprietary NVIDIA binary driver
  • REBOOT - the nvidia driver works at the kernel level so you won't be able to just restart X. fools
  • WHY does ubuntu make you do all this?

Next, here is the "magic super-secret" Seiki 4K goo that should go in xorg.conf (if needed). It's from: http://ubuntuforums.org/showthread.php?t=2164924 See /etc/X11/xorg.conf for the full details:

   # MDM added based on http://ubuntuforums.org/showthread.php?t=2164924
   # Modeline "3840x2160" 307.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
   # MDM 2015/02/12 A more recent one from: http://ubuntuforums.org/showthread.php?t=2164924&page=3&s=b53cb9ea1b751f4b9f2fe1aadfb6f43f
   Modeline "3840x2160" 296.70 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
   Modeline "1920x1080" 297 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync

To get a full output of what the hell X is doing:

scite /var/log/Xorg.0.log &
# Or create one if needed
X -logverbose 6 :2 # this crashed my machine but did produce a log first
scite /var/log/Xorg.2.log &
Ubuntu repo management
To see what repos Ubuntu is currently using:
cat /etc/apt/sources.list
Ubuntu upgrade from command line
To update ubuntu from an i3 terminal:
sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current package
sudo apt-get dist-upgrade  # Installs updates (new ones)
Raspberry Pi
Install
  • Get a Raspbian image from here
  • Create a boot MicroSD following this
  • Use gnome-disks to expand the root partition to 16GB, and create a nice ExFat share on the rest if there is more space
  • Boot it up and fix the locale with
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales # USE THE SPACE TO SELECT US and unselect GB (fucked up keyboard)
sudo dpkg-reconfigure keyboard-configuration # pick US or your keyboard is fubar
# now you have to reboot - this is a disaster pi, fix it

One-shot install of everything, then see more detailed notes, below...

sudo apt-get install i3 i3lock i3status suckless-tools dunst openssh-server cifs-utils smbclient synergy arandr exfat-fuse exfat-utils hfsprogs gparted p7zip-full k4dirstat screen rxvt-unicode grdesktop openvpn bridge-utils kdiff3 nautilus-compare smartmontools automake libtool npm git

Dev install goes pretty well too:

sudo apt-get install emacs build-essential automake libtool libssl-dev libbz2-dev python-dev curl libcurl4-openssl-dev php5-common php5-curl php5-cli php5-json php5-readline sqlite3 sqlitebrowser

Install node with Node Version Manager (nvm) exactly the same way as in ubuntu (see above). There is no chromium-browser, use epiphany-browser.

You can go through a lot of the additional steps in the same way as on Ubuntu (to install Java, Sublime, eclipse, etc.)

OpenELEC
OpenELEC multi-boot install
The easiest way is to add a new drive just for OpenElec and install OpenElec to it with the installer. But if you want to SHARE ONE DRIVE with other boots, DO NOT DO THAT :-) Do this instead:
  • On an existing refind-booted system, set up two new ext4 partitions
    • one about 2GB in size, labeled [SYSTEM], and marked as bootable
    • the other with 10GB or more, labeled [STORAGE]
    • prep the drives (no journal, ssd trim)
  • download openelec and mount; there are a couple ways:
    • get the img and install to a thumb
    • get the img and mount (see below)
  • Set up OE drives to mount in other OSes to /openelec-system and /openelec-storage
/dev/disk/by-label/SYSTEM  /openelec-system  ext4 noatime 0 0
/dev/disk/by-label/STORAGE /openelec-storage ext4 noatime 0 0
  • copy target/KERNEL and target/SYSTEM to SYSTEM
cp OpenELEC_img/target/KERNEL /openelec-system/
cp OpenELEC_img/target/SYSTEM /openelec-system/
  • set up UEFI boot
    • subl /boot/efi/EFI/refind/refind.conf (and add this block)
# MDM Trying this, from: http://openelec.tv/forum/64-installation/70783-how-to-efi-booting-openelec-on-new-pc-s-nuc-s
# Only I had to change BOOT to SYSTEM.  and quiet to debugging.
menuentry OpenELEC {
	  icon EFI/refind/icons/os_openelec.png
	  volume SYSTEM
	  ostype Linux
	  loader KERNEL
#	  options "boot=LABEL=SYSTEM disk=LABEL=STORAGE debugging"
	  options "boot=LABEL=SYSTEM disk=LABEL=STORAGE quiet"
}
  • I THINK you need one or more of these too, not sure!
cp target/boot/bootx64.efi /openelec-system/BOOT
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
OpenELEC boot from thumb
NOTE: I have the image already on a white stick with red lettering... anyway...
  • Get the latest dev version (stable didn't work for me although this may change)
  • dd it onto a thumb
  • reboot and select to boot to the thumb in BIOS
  • when the boot: line comes up, type "live" to get run a live Kodi rather than run the crufty old installer
gentoo
Chroot into gentoo from (say) ubuntu
# These may already be done
mount /mnt/gentoo
cp -L /etc/resolv.conf /mnt/gentoo/etc/

mount -t proc none /mnt/gentoo/proc
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash

# ** NOW IN CHROOT **
env-update
source /etc/profile
export PS1="(chroot) $PS1"

# GET TO IT!  :-)
Windows
Windows 10 new setup
C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User
  • etc.
Symbolic links (symlinks - needed for config files, svn overlay)
i'm setting up hard links from sublime install folder to shared config settings:
mklink [/H /D /J] link_path Target_file/folder_path

We had to use a soft link, hard won't go across drives. And you have to run the cmd window as admin. Don't specify type, and it will create a soft file link:

mklink "C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-keymap" "D:\Michael's Data\development\config\common\home\m\.config\sublime-text-3\Packages\User\Default (Windows).sublime-keymap"
mklink "C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User\Preferences.sublime-settings" "D:\Michael's Data\development\config\common\home\m\.config\sublime-text-3\Packages\User\Preferences.sublime-settings"

Here is another example, setting up a link in an SVN repo folder to point to a git-controlled folder on another drive. SVN is OK with this, cool.

(open ADMIN cmd prompt)
cd C:\CODE\QA\ContinuousIntegration\Trunk
mklink /J scripts "D:\Michael's Data\development\power_analytics\scripts"
  Junction created for scripts <<===>> D:\Michael's Data\development\power_analytics\scripts
Route traffic to avoid VPN
You can use "route" to assign paths to specific traffic.

So bitpost.com requests go through eth0 instead of VPN, eg...

C:\WINDOWS\system32>route add 174.109.14.112 192.168.50.1

Note that you can do this with [route] in linux too, syntax is a bit diff.

Boxes
BOX: bitpost
drives
My primary server at Peace Street

I had to stuff the goddamned drives right into the case since the rosewill was giving me such shit. In hindsight, it might not have been the rosewill at all... I am considering restuffing the box with the drives... but for now, i have this:

sda  root
sdb1 tvmind
sdc1 film
sdd & sde softraid
sdf1 spicey
sdg1 reservoir
sdh1 plethora
sdi1 win

Before it was like this:

   ================================
   BAYS of the bitpost.com Rosewill
   ================================

       To figure this stuff out, it was easiest to mount/umount drives and/or just access the mounted files
          (and watch the bay lights, of course)

        Disk layout:

            8 7 6 5
            4 3 2 1

        1) spicey-3g-mel
        2) reservoir-3g-mel
        3) tvmind-4g-mel
        4) newraid1-4tb-bp WD Black installed 2014-10-05

        5) plethora-3tb-bp i hope this was not being used - 3GB Seagate barracuda - mount says some ntfs looking thing with no partitions and unable to mount - so i reformatted ext4
        6) win-pax09 some old windows drive with lots of game goodies; also has sdf2 swap partition (kill it some day)
        7) film-6tb-bp WD Green installed 2014-10-05
        8) newraid2-4tb-bp WD Black installed 2014-10-05

   ================================

Before THAT, it was this... 8 bay SATA tower houses these drives:

  1. 2.0tb archive (sdb right?)
  2. 250gb landofthelost circa ABB timeframe /dev/disk/by-label/LandOfTheLost /dev/sdc1
  3. 1.5tb raid drive #1 /dev/disk/by-label/d-sp-raid -> ../../sdd1
  4. 2.0tb latest /dev/disk/by-label/d-sp-20newmovies -> ../../sde1
  5. 1.5tb raid drive #2 (needs label change maybe)
There are also these drive partitions:
  • / /dev/sda4
  • ubuntu root ub_root -> ../../sda5
  • /vista /dev/sda3
rtorrent keys
rtorrent CAN actually work pretty well, IF you pay attention to these basic keys:
  • enter - specify a torrent file to load - USE TAB COMPLETION
  • ctrl-d - STOP torrent, smack that shit, delete it forever
  • ctrl-s - START torrent - WARNING ONLY WORKS IF YOU DISABLE TERMINAL CAPTURE with...
stty stop undef
stty start undef
  • ctrl-o - change download dir
  • ctrl-k - close files - needed before ctrl-o, usually
  • ctrl-r - recheck hash

NOW GET rutorrent going!  :-)

rtorrent fix torrents that didn't move into place properly
* if the torrent is archived properly, use move_and_resymlink to move it:
cd ~/download/torrents/archived/symlinks
move_and_resymlink [symlink] [destdir]
  • if things are a mess due to hard drive failure (etc), you should do this:
    • use r(u)torrent to see where rtorrent thinks the files are
    • copy the files, if available, to the final destination (under a .* dir in symlinks)
    • create a symlink: ln -s .music/Fresh/ELO-Secret\ Messages ELO-Secret\ Messages
    • close the torrent files (ctrl-k), move the destination (ctrl-o), start again (ctrl-s)
Updating mediawiki installation
cd /var/www/localhost/htdocs/mediawiki
emacs LocalSettings_redirector.php (to hardcode each site)
php maintenance/update.php
(repeat for each site)
emacs LocalSettings_redirector.php (to reset dynamic behavior)
Creating a new ssh key pair for no-password access to a remote system
Say you've got a new machine with user [m] and you want to connect to it, do this:
  • install sshd, make sure it's running
  • get on the new machine - ssh to the new machine by typing the password if you don't have direct access
  • $ scp m@tdm:.ssh/id_rsa .ssh/
  • $ scp m@tdm:.ssh/authorized_keys .ssh/
wow I just had serious issues with basic ssh usage, so i'll put a summary on the wiki
   basically most misunderstandings stem from describing these two:
       client: machine that is trying to ssh into the server
       server: machine that the client user wants to get to
   most poor sots are just sitting on the client
   and they create a pair and push their public key to the server
   but in my case, more often, i want to create a pair on the server
   and push the private key to the multiple places i need to connect FROM
   when doing that, you have to push the public key into the server's authorized_keys
   and configure the client to juggle multiple private keys

       create a key pair:
           ssh suser@server
           ssh-keygen
               use defaults
               will create:
                   .ssh/id_rsa (private key)
                   .ssh/id_rsa.pub (public key)

       put the public key in place:
           cd .ssh
           cat id_rsa.pub >>authorized_keys

       put the private key on the client and configure:
           scp id_rsa cuser@client:.ssh/id_rsa_server
           ssh cuser@client
           em .ssh/config
               Host tdm thedigitalmachine.com
                 Hostname thedigitalmachine.com
                 IdentityFile ~/.ssh/id_rsa
                 User m
               Host server
                 Hostname server.com
                 IdentityFile ~/.ssh/id_rsa_server
                 User suser

   all is full of light
bitpost LAN IP addresses
All IP address management happens on bitpost, via dnsmasq, which, rocks.
  • Set up machine names in /etc/hosts
  • Set up IP leases by MAC address in top of: /etc/dnsmasq.conf

Initially set up bitpost with DHCP as follows:

  • emacs /etc/conf.d/net
config_eth0="dhcp"
config_eth1="192.168.22.1/24"

Turn DHCP-assigned IP into static as follows:

  • /etc/init.d/net.eth0 restart
   dhcpcd[3867]: eth0: carrier acquired
   dhcpcd[3867]: DUID 00:01:00:01:1a:c3:6f:da:e0:3f:49:a3:4b:d9
   dhcpcd[3867]: eth0: IAID 49:a3:4b:d9
   dhcpcd[3867]: eth0: rebinding lease of 66.57.227.83
   dhcpcd[3867]: eth0: leased 66.57.227.83 for 86400 seconds
   dhcpcd[3867]: eth0: adding route to 66.57.226.0/23
   dhcpcd[3867]: eth0: adding default route via 66.57.226.1
  • emacs /etc/conf.d/net
config_eth0="66.57.227.83/23"
routes_eth0="default via 66.57.226.1"
  • /etc/init.d/net.eth0 restart

We will monitor and log success here to see how it goes.

  • 2014/05/05 set to static 66.57.227.83/23, gateway 66.57.226.1
view dnsmasq IP leases
cat /var/lib/misc/dnsmasq.leases
Updating mediawiki installation
cd /var/www/localhost/htdocs/mediawiki
emacs LocalSettings_redirector.php (to hardcode each site)
php maintenance/update.php
(repeat for each site)
emacs LocalSettings_redirector.php (to reset dynamic behavior)
BOX: melange
My primary dev box

90% ubuntu for development 10% gaming machine, has steam, low end half-height video card that works fine for Risk of Rain etc. It has a mid-range video card, enough to drive 1080p x 2 for development. This used to be the primary Kodi box up until 10/2015, should still be current. It has the same high-end i5 or i7 of other 2015 boxes, fast.

drives
  • /dev/sda contains ubuntu, kodi, windows - using ubuntu 90% of the time
  • /dev/sdb melange_data
    • formatted as exfat
used gparted to remove existing partitions
used gdisk to create an EFI partition table and an 8300 "linux file system"
mkfs.exfat /dev/sdb1
exfatlabel /dev/sdb1 melange-data
emacs /etc/fstab
  /dev/disk/by-label/melange-data /melange_data exfat noatime 0 0
BOX: wallee
My 2009 MacbookPro 5.3 multi-boot laptop (see blog for multi-boot howto)

Ubuntu Install all hardware-specific packages in one shot:

sudo apt-get install firmware-b43-installer xserver-xorg-input-mtrack

Post-install MUST-DOs:

  • broadcom "b43" wifi driver:
sudo apt-get install firmware-b43-installer
(reboot)
  • synaptic driver (for trackpad)
sudo apt-get install xserver-xorg-input-mtrack
# use synclient to determine what works best
su -
synclient -l # lists all params
synclient PalmDetect=1 # temporarily change settings
# save what you like, here:
root@wallee:~# emacs /etc/X11/xorg.conf.d/60-synaptics.conf

Windows 10

    • Upgraded existing Windows 8.1
    • Hack the INF file of the nvidia driver to get it to install - runs PERFECTLY
      • TODO add details
    • Add bluetooth stack - or not - i think i ended up back at the default Windows
    • keyboard driver to get function key working: /spiceflow/softraid/software/OS/windows/macbook_windows10_drivers/AppleKeyboardInstaller64.exe
Reset 1020 cable modem so it grants a real IP address (not private)
Resetting things sometimes has to be done in this precise order:
  • cable modem -> blue cable -> **ONBOARD** bitpost NIC
  • LAN switch -> yellow cable -> **ADDON CARD** bitpost NIC
  • power off bitpost and cable modem
  • power up cable modem
  • wait 5 minutes
  • power up bitpost
  • verify that you can ping google.com, LAN works, etc.
BOX: case
To install ubuntu, I had to add [... --- nomodeset] to the boot line in the grub booter.

Then I had to use a desktop 1080p monitor - the 4k Sony would not come up for some reason.

BOX: Raspberry Pi 2 and 4k
You can override settings in /flash/config.txt; here's how, from here:
mount -o remount,rw /flash
nano /flash/config.txt
# Make your changes, then ctrl+x to save.
mount -o remount,ro /flash
reboot 

Settings for 4k (from here)...

disable_overscan=1
hdmi_ignore_edid=0xa5000080
hdmi_cvt 3840 2160 30
framebuffer_width=3840
framebuffer_height=2160
hdmi_group=2
hdmi_mode=87
hdmi_pixel_freq_limit=400000000
max_framebuffer_width=3840
max_framebuffer_height=2160

I couldn't get 4K to stick in OpenELEC tho (except for the splash screen(!))...

Settings->System->System->Video->Refresh->30Hz
Settings->System->System->Video->Resolution->3840x2160
(it won't come up, just drops back to 1080p.. just as well, video at 30fps sucks...)

And to overclock the Pi 2 (from here):

# OVERCLOCKING TO 1.1 GHz, EXTREME
# default is 700
# this will NOT void the warranty :-)
arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=6
temp_limit=80 #Will throttle to default clock speed if hit.
#
# there is also the "turbo" thingee (that "voids warranty", hot!!)
#force_turbo=1
BOX: tdm
My primary server that does just about everything internet-related

P8P67LE mobo Intel i5 quad core

names that are hosted:

  • thedigitalmachine.com
  • thedigitalage.org
BOX: dune
Follow the ubuntu install.

We also use a StarTech AC600 ac wifi adapter. The chipset is specified here. It's a Realtek - RTL8811AU. It is not supported with the vanilla 15.04 kernel, but it's easy to build a module from sources available on github:

sudo apt-get update
sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/gnab/rtl8812au.git
cd ~/rtl8812au
make
sudo make install
sudo modprobe 8812au

Then, run NetworkManager and nm-applet, and as soon as you plug the USB dongle in and remove the wired connection, you'll get a running wifi applet, YES.

We also want to drive the crappy Seiki at 4K. A 4k mode shows up in our X probe, but ubuntu is not picking it...... yet...

OLD gentoo NOTES

My XMBC media center and samba-based storage server

AMD

post-kernel tasks:

 make sure you update /etc/conf.d/modules for any new modules added
 update-modules
 module-rebuild populate
 module-rebuild rebuild (if you feel brave)
 module-rebuild list (if you want to do it manually)
 # NOTE: NO MORE ATI-DRIVERS they no longer support my old-ass onboard HD 3000 graphics chip
 # But the open-source radeon driver does, oh yeah!
 emerge lirc # etc
 emerge -a1 $(qlist -IC x11-drivers/)
 update-modules
 dispatch-conf
 # NO! eselect opengl set ati
 #     aticonfig --ovt opengl # "no supported adapters"?
 eselect opengl set xorg-x11
 reboot
BOX: wimpy
My main development workstation

P8P67LE mobo Intel i5 quad core website

drives and partitions:

  • sda HDD, OLD OSes, need to wipe and reformat to ntfs; sda2 ntfs 1.1TB old??
  • sdb
    • sdb1 fat32 300MB wimpy-efi
    • sdb2 ntfs 147GB windows10???
    • sdb3 fat32 287MB /boot/efi
    • sdb4 linux-swap 7GB
    • sdb5 ext4 wimpy-ubuntu-ssd 216GB
    • sdb6 ext4 wimpy-gentoo-ssd 54GB
    • sdb7 ext4 wimpy-openelec 19GB
    • sdb9 fat32 "boot, esp"

check in windows:

 wmic baseboard get product,Manufacturer,version,serialnumber

boot is in /ubuntu/boot



grub menu: /ubuntu/boot/grub/menu.lst

post-kernel tasks:

make sure you update /etc/conf.d/modules for any new modules added
update-modules
module-rebuild populate
module-rebuild rebuild (if you feel brave)
module-rebuild list (if you want to do it manually)
emerge nvidia-drivers (etc)
update-modules
dispatch-conf
eselect opengl set nvidia
reboot

if you break gentoo (or rather, if gentoo devs break gentoo, or open source hacks break gentoo, or whatever... but ultimately, you...)...

boot into ubuntu
su -
./chroot_to_gentoo
(chroot) ./setup_chroot
** FIX IT **

to install a new kernel that ubuntu will serve up...

build it in a chroot
back in ubuntu, copy it:
 cp /mnt/gentoo/usr/src/linux/arch/x86_64/boot/bzImage /boot/linux-blahblbahba
and update grub.  you can change em both or just the second (and rerun grub-mkconfig >/boot/grub/grub.cfg):
 emacs /boot/grub/grub.cfg
 emacs /etc/grub.d/09_gentoo