Maintenance reference: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
 
(371 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Reference ==
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! LAN IP addresses
! General tasks
|-
|-
| We want all IP address management to happen on the Buffalo DD-WRT router, as much as possible.
|
{| class="mw-collapsible mw-collapsed wikitable"
! MIGRATION IN PROGRESS: config distro machine migration
|-
|Start to revamp config from [machine]/[distro] to [distro]/[machine] to match scripts.  It's not hard even though it's dangerous.  You can do each machine separately from others.  Get on it!
# DO THIS ALL IN ONE SESSION, do not log out
cd development/config
mkdir -p distro # prolly not needed
git mv machine/distro distro/machine
setup_stow.sh # repeat until it doesn't fail; check each failure to make sure it is a symlink, and simply rm them as you go
|}
 
[[Maintenance of my music collection]]
 
[[Restarting everything]]
 
[[Add a new VM to melange]] - [[Clone a melange VM]] - [[Linux barebones quickstart]]
 
[[Scripts]] - [[Add a user]] - [[Linux permissions]] - [[DNS]]
 
[[Tune linux performance]]
 
[[Turn off ubuntu gnome screenlock]] - [[Set ubuntu default browser]]
 
[[Add a drive]] - [[Back up drive]] - [[Check disk]] - [[Check disk speed]]
 
[[Bash basics]] - [[OS X basics]] - [[DOS basics]] - [[Update gentoo kernel]]
 
[[SSL certificate instructions]] - [[Networking]]
 
[[systemd]] - [[udev: Assign unique names to your devices]]
 
[[Automatically mount and unmount your devices]]
 
[[udev: Autorun programs when connecting your devices]]
 
{| class="mw-collapsible mw-collapsed wikitable"
! master keyboard shortcuts map
|-
|See .i3/config. 
 
Typically you can press ctrl-shift-K to open it in editor.
 
The local file usually points to the common version, here:
~/development/config/common/home/m/.i3/config
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Upgrade Ubuntu
|-
| To update ubuntu from an i3 terminal:
su -
apt-get update        # Fetches the list of available updates
apt-get upgrade      # Strictly upgrades the current package
apt-get dist-upgrade  # Installs updates (new major versions, i think)
update-manager -d    # kick off the update manager to migrate to new release when available
Or just call the script that does the same thing:
upgrade_ubuntu
I'm currently migrating everything to 16.04 Xenial Xerus.
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Increase max open file handles
|-
| I do it here:
~/development/config/common/etc/sysctl.d/20_MDM_sysctl.conf
That basically sets the user max when I do my stow thing.  Alternatively, you can set it directly in
/etc/sysctl.conf
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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!  :-)
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Windows symbolic links
|-
| Windows symlinks - needed for config files, svn overlay, etc.
 
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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Windows 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.
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Windows command prompt FULL SCREEN
|-
|Type cmd in start search box and right-click on the cmd shortcut which appears in the results. Select Run CMD as administrator.
Next, in the command prompt, type wmic and hit Enter.
Now try to maximize it!
Close it and again open it. It will open as a maximized window!
You may have to ensure that the Quick Edit Mode in the Options tab is checked.
|}
|}
<!--
 
 
===========================================================================================================================================================================================================================================================================================
 
 
-->
=== Boxes ===
[[Bitpost]] - [[Melange]] - [[Cast]] - [[Bluto]] - [[Cobra]] - [[Case]] - [[Viper]] - [[Wimpy]]
 
=== Melange VMs ===
[[AbtDev1]] - [[Positronic]] - [[Morosoph]] - [[Glam]] - [[Hive]] - [[Bandit]] - [[Matryoshka]] - [[Hoard]] - [[Tornados]] - [[Matcha]] - [[Windozer]]
 
=== Devices and Hardware ===
 
[[My server rack]]
 
Cable Modem - [https://www.sony.com/electronics/support/televisions-projectors-lcd-tvs/xbr-65x800b/specifications Sony 65" TV] - [https://www.tcl.com/us/en/products/home-theater/p-series/tcl-55-class-p-series-4k-uhd-hdr-roku-smart-tv-55p605 TCL 55' TV] - [https://www.asus.com/us/Networking/RT-ACRH13/ProductPrint/ ASUS router]
 
IOTs: [[lime]] - [[carambola]] - [[Arduino]]
 
[[Flash Drives]] - [[Stadia controller]] - [[Logitech F710 Controller]]
 
[[Aeron chair]] - [[Jetson Electric Bike]]
 
=== Third Party Services ===
[[Cloudflare]] | [[LetsEncrypt]] | [[Sendgrid]]
 
<!--
 
 
===========================================================================================================================================================================================================================================================================================
 
 
-->
{| class="mw-collapsible mw-collapsed wikitable"
! Hardware notes
|-
|
{| class="mw-collapsible mw-collapsed wikitable"
! NO TEARING on Sony driven by nvidia (currently, case)
|-
|It's not really about Kodi settings, you have to set up nvidia settings, and they are HARD to get to stick because it's "automatic" but broken.
* Ensure nvidia-settings is set to 4k at 60fps refresh rate - YOU HAVE TO DO THIS ON EVERY REBOOT until we set up an xorg.conf FML
* Ensure Kodi has "sync video to display" turned ON
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Copy from linux nautilus to android "Operation unsupported"
|-
| Weird assed linux prevents "SMB to USB" copies, FUCKOFF.  Workaround is to copy to local drive, then copy to phone.  Wow that is sickening.
|}
|}
<!--


Ideally, static IPs will be served up to every known box based on MAC address.
Then no matter what OS is booted, the machine will have the same name and IP address.
The router is slick, it can do it, but be careful to Save AND Apply changes there.
DHCP dynamic assignment IP range is 2...99, keep static IPs out of this range.


every [/etc/hosts] should include this block:
===========================================================================================================================================================================================================================================================================================
<pre>
# ========================================================================================
# MDM My LAN names v10


192.168.21.1  tdm
192.168.21.200 buffalo      # hardcoded Buffalo DD-WRT router IP


# MDM Buffalo DHCP-provided static IPs assigned by MAC addresses
-->
# It's important to assign static IPs via router
{| class="mw-collapsible mw-collapsed wikitable"
# It will always give the same IP regardless of OS
! Old notes and dead boxes
# And it has the ability to provide the names via local DNS (I think!)
|-
# NOTE THAT 192.168.21.2-99 are RESERVED for dynamic IPs
|
192.168.21.132 wimpy            # F4-6D-04-25-9C-60
{| class="mw-collapsible mw-collapsed wikitable"
192.168.21.133 wallee-wireless  # macbook pro 00:26:bb:07:d3:7d
! Oontz turn on dual pairing
192.168.21.134 wallee          # macbook pro 00:26:4a:18:ed:58
|-
192.168.21.140 babe            # andrea's ipad2 04:54:53:3A:7B:2A
| Turn them both on.  One should be paired with your phone, the other should be flashing blue, trying to connect.
192.168.21.179 dune            # 00:1f:e2:07:2d:0e
 
On the Play Control Speaker (speaker with solid Blue Light) press and hold down the Play/Pause button for 5 seconds until the flashing White Light appears and the speaker says “Dual Pairing”. - The Play Control Speaker will then connect to the second speaker.
 
There is NO WAY you can guess this.  You'll be back here to re-learn...
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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 [https://help.ubuntu.com/community/BinaryDriverHowto/AMD binary ATI driver].
lspci -vvnn | grep VGA
[...] Advanced Micro Devices, Inc. [AMD/ATI] RS780 [Radeon HD 3200] [1002:9610]


# TO BE ADDED UPDATED AND VERIFIED AS NEEDED
|-
# NOTE THAT 192.168.21.2-99 are RESERVED for dynamic IPs
|'''nvidia'''
192.168.21.4 darthfun    # mike's iphone 00:26:B0:99:7F:7E
For 4k video on an nvdia chipset (like wimpy), first get Ubuntu to use nvidia's driver:
192.168.21.5 eetee        # ipod touch 8gb 00:26:b0:59:4a:94
* Go to System Settings-> Software & Updates
192.168.21.6 sweepea      # girl's d-link card 00:1e:58:96:3a:2a
* Select the Additional Drivers tab
192.168.21.7 wiihii      # wii 00:21:47:ba:c8:c2
* Select the tested, proprietary NVIDIA binary driver
192.168.21.8 iroku        # roku wired 00:0d:4b:49:a6:30
* REBOOT - the nvidia driver works at the kernel level so you won't be able to just restart X. fools
192.168.21.9 irokit      # roku wireless 00:0d:4b:49:a6:31
* WHY does ubuntu make you do all this?
192.168.21.10 wynter      # bailey's win7 laptop 00:11:F5:89:7B:00
Next, here is the "magic super-secret" Seiki 4K goo that should go in xorg.conf (if needed).
192.168.21.11 hermione    # andrea's dell inspiron 00:24:D6:78:42:A8
It's from: http://ubuntuforums.org/showthread.php?t=2164924
192.168.21.12 toothless  # wren's eee 1C:4B:D6:A3:E1:28
See /etc/X11/xorg.conf for the full details:
192.168.21.13 dunno      # 00:0f:b5:f6:99:d2
    # MDM added based on http://ubuntuforums.org/showthread.php?t=2164924
192.168.21.16 jackwhite  # wren's iphone 54:26:96:BB:A4:CD
    # Modeline "3840x2160" 307.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
192.168.21.193 hermione-wired
    # MDM 2015/02/12 A more recent one from: http://ubuntuforums.org/showthread.php?t=2164924&page=3&s=b53cb9ea1b751f4b9f2fe1aadfb6f43f
192.168.21.194 toothless-wired  # MAC address 48:5B:39:2B:8F:E8
    Modeline "3840x2160" 296.70 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
192.168.21.195 6c-blade1
    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 &
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Fix things after IP changes
|-
| Time Warner seems to keep giving the same IP back to my main linux router/server, as long as the NIC card doesn't change. It also happened when they upgraded my service (and started labeling my IP as dynamic to SpamHaus, fuckers...).


# ========================================================================================
If it changes, fix these things:
</pre>
* Update the IP at 1and1.com for ALL domains, bleh...
* mod evasive has a whitelist, it needs the actual IP, bleh...
-rw-r--r-- 1 m m 1.1K Mar 28 22:13 /home/m/config/etc/apache2/modules.d/10_mod_evasive.conf
* reset cable modem (see specific steps)
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! Media Center drives
! Reset 1020 cable modem so it grants a real IP address (not private)
|-
|-
| 8 bay SATA tower houses these drives:
| 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.
|}
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: bitpost
|-
|[[Update gentoo kernel]]
{| class="mw-collapsible mw-collapsed wikitable"
! drives
|-
| My primary server at Blount St
 
    bitpost ~ # df
    Filesystem    1G-blocks  Used Available Use% Mounted on
    /dev/sda7          171G  143G      19G  89% /
    /dev/sdb1          3668G 3343G      326G  92% /spiceflow/tvmind-4g-mel
    /dev/sdc1          5545G 3585G    1681G  69% /spiceflow/film-6tb-bp
    /dev/md0          3668G 1578G    1904G  46% /spiceflow/softraid
    (^sdd+sde)
    /dev/sdf1          3667G    1G    3667G  1% /spiceflow/hare-s3-4t
    bitpost ~ # lsblk                                                       
    NAME  MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
    sda      8:0    0 232.9G  0 disk 
    ├─sda1  8:1    0  190M  0 part 
    ├─sda5  8:5    0  3.8G  0 part  [SWAP]
    ├─sda6  8:6    0  55.9G  0 part 
    └─sda7  8:7    0  173G  0 part  /
    sdb      8:16  0  3.7T  0 disk 
    └─sdb1  8:17  0  3.7T  0 part  /spiceflow/tvmind-4g-mel
    sdc      8:32  0  5.5T  0 disk 
    └─sdc1  8:33  0  5.5T  0 part  /spiceflow/film-6tb-bp
    sdd      8:48  0  3.7T  0 disk 
    └─md0    9:0    0  3.7T  0 raid1 /spiceflow/softraid
    sde      8:64  0  3.7T  0 disk 
    └─md0    9:0    0  3.7T  0 raid1 /spiceflow/softraid
    sdf      8:80  0  3.7T  0 disk 
    └─sdf1  8:81  0  3.7T  0 part  /spiceflow/hare-s3-4t
 
2019/06/01 spicey-3g died just as its replacement arrived, cest la vie.  lost a bit of everything, move on.  replaced with hare-s3-4t:
 
    Jun  2 17:40:54 bitpost kernel: ata8: hard resetting link
    Jun  2 17:40:55 bitpost kernel: ata8: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
    Jun  2 17:40:55 bitpost kernel: ata8.00: supports DRM functions and may not be fully accessible
    Jun  2 17:40:55 bitpost kernel: ata8.00: ATA-11: Samsung SSD 860 QVO 4TB, RVQ01B6Q, max UDMA/133
    Jun  2 17:40:55 bitpost kernel: ata8.00: 7814037168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
    Jun  2 17:40:55 bitpost kernel: ata8.00: supports DRM functions and may not be fully accessible
    Jun  2 17:40:55 bitpost kernel: ata8.00: configured for UDMA/133
    Jun  2 17:40:55 bitpost kernel: ata8: EH complete
    Jun  2 17:40:55 bitpost kernel: scsi 7:0:0:0: Direct-Access    ATA      Samsung SSD 860  1B6Q PQ: 0 ANSI: 5
    Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: Attached scsi generic sg5 type 0
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Write Protect is off
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
    Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
    Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Attached SCSI disk
 
Before, 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:
# 2.0tb archive (sdb right?)
# 2.0tb archive (sdb right?)
# 250gb landofthelost circa ABB timeframe /dev/disk/by-label/LandOfTheLost /dev/sdc1  
# 250gb landofthelost circa ABB timeframe /dev/disk/by-label/LandOfTheLost /dev/sdc1  
Line 65: Line 385:
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! Adding a new drive
! rtorrent keys
|-
| To add a new drive:
# ls /dev/sd* # and make note of what you have
# stuff the new drive in the SATA tower or plug it into a SATA socket
# ls /dev/sd* # you should now see something new, like [/dev/sdf]
# parted /dev/sdf
# print # should show nothing or errors
# mklabel gpt # this sets the drive up for "big" >2TGB partition labeling - WARNING: TRASHES EVERYTHING ON THE DRIVE
# mkpart primary ext4 0 -1s # makes an ext4 primary partition that goes from start (0) to end (-1s), yay
# quit # yeah weird but that's how you exit, things are changed as you go (oops should have told you that before)
# mkfs.ext4 -m 0 /dev/sdf1 # the [-m 0] is very important; without it, goofy ext4 wastes 5% "saved for root" wtf
# mount /dev/sdf1 /somewhere # make sure it looks good!
# umount # we are NOT going to be manually mounting!  we need to label the drive and put it in /etc/fstab
# e2label /dev/sdb1 box-type-sizename # what a stupid f'in name for that util
# emacs /etc/fstab - and put in an entry like this:
/dev/disk/by-label/box-type-sizename  /my-mount-location    ext4    noatime        0 2
# mount /my-mount-location # now it will be there when you reboot!  but do this to get it NOW :-)
# Note that if you mount the new drive under /spiceflow, samba will already be serving it up, whoop!
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Adding a user to the server
|-
|-
|
| rtorrent CAN actually work pretty well, IF you pay attention to these basic keys:
su -
* enter  - specify a torrent file to load - USE TAB COMPLETION
# only needed if you want them to have their own group (otherwise use "users" group)
* ctrl-d - STOP torrent, smack that shit, delete it forever
groupadd #newuser#
* ctrl-s  - START torrent - WARNING ONLY WORKS IF YOU DISABLE TERMINAL CAPTURE with...
# the additional groups here are optional
  stty stop undef
  useradd #newuser# -m -g #newuser# -G users,wheel,audio,video,games,dvd,usb -s /bin/bash
  stty start undef
  passwd #newuser#
* ctrl-o - change download dir
mkdir /home/#newuser#
* ctrl-k - close files - needed before ctrl-o, usually
chown #newuser#:users /home/#newuser#
* ctrl-r - recheck hash
NOW GET rutorrent going!  :-)
# 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 correctlycrazy
# you can try this in Windows but it didn't work for me:
#  net use
#  net session \\samba.server.ip.address /delete
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! Updating mediawiki installation
! rtorrent fix torrents that didn't move into place properly
|-
|-
|
| * if the torrent is archived properly, use move_and_resymlink to move it:
  cd /var/www/localhost/htdocs/mediawiki
  cd ~/download/torrents/archived/symlinks
  emacs LocalSettings_redirector.php (to hardcode each site)
  move_and_resymlink [symlink] [destdir]
php maintenance/update.php
* if things are a mess due to hard drive failure (etc), you should do this:
(repeat for each site)
** use r(u)torrent to see where rtorrent thinks the files are
emacs LocalSettings_redirector.php (to reset dynamic behavior)
** 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)
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
Line 172: Line 458:
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! Back up a linux system to a second bootable drive
! 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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! view dnsmasq IP leases
|-
|
cat /var/lib/misc/dnsmasq.leases
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: viper
|-
|-
| Steps:
| 2016 ASUS Republic of Gaming laptop
# We want to copy all files from the root drive to a new drive.
# We also want to update the boot menu to boot off the new drive.
# 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.
{| class="mw-collapsible mw-collapsed wikitable"
When we're done, we'll boot from that drive to prove we have a working standby system.
! Boot from USB
 
|-
rsync does an excellent job of copying just what we need.  Test it with this:
| I had to flip bios switches:
# a (archive mode -rlptgoD) v (verbose) x (don't cross filesystems) h (human-readable) n (dry run)
* Disable secure boot
rsync -avxhn --progress / /spiceflow/2.0tb-newmovies/
* Enable CSM (some compatibility bullshit)
Do the job with this:
* Reboot, THEN USB will show in boot options, just hit del to enter bios, go to save page, and select the USB you want to override on next bootPITA!
rsync -avxh / /spiceflow/2.0tb-newmovies/
|}
{| class="mw-collapsible mw-collapsed wikitable"
  sent 28.10G bytes  received 8.64M bytes  15.63M bytes/sec
! Trackpad
  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...
* Toggle on/off:
/var/tmp
toggle_trackpad.sh
xbmc log files
* Dynamically adjust:
etc
  xinput list # recently, "Elan Touchpad" is #14
Next we fix /etc/fstab on the new drive to use the drive as rootOriginal config:
  xinput list-props 14
/dev/disk/by-label/d-g2-root        /                          ext3    noatime        0 1
  xinput --set-prop 14 "Trackpad Sensitivity" 55 # speed (55 good, 75 faster)
/dev/disk/by-label/d-sp-20newmovies /spiceflow/2.0tb-newmovies  ext4    noatime        0 2
  xinput --set-prop 14 "Trackpad Touch Pressure" 6 1 # finger (6 1) vs thumb (12 1)
New config (remember tho, we lose the 2gb drive):
* Persist settings here (note they kinda match up but diff names, sigh):
/dev/disk/by-label/d-g2-root        /root-hot-drive ext3    noatime        0 1
  /etc/X11/xorg.conf.d/60-synaptics.conf
/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?)
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! wallee gentoo networking
! BOX: wimpy
|-
|-
| Laptop has both wired and wifi adapters.
| My main gaming machine


We set up [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2 custom network interface names] to make it more clear.
P8P67LE mobo Intel i5 quad core
[http://www.asus.com/Motherboards/P8P67_LE/ website]


I had installed several tools when attempting to get this going. DO NOT DO THAT, they interfere with one another.  Removing NetworkManager and going with the highly-recommended wpa_supplicant and its graphical tools wpa_gui and wpa_cli.
* HARDWARE:
** Plug keyboard/mouse hub into TOP USB SLOT in back or BIOS won't recognize it
** Make sure you plug Vive usb into a USB 3.0 slot
* ON BOOT:
** REMOVE USB KVM or the keyboard won't work - most of the time that's ok because we let it go through
** IF you boot into ubuntu, the USB hub didn't seem to work, i had to plug right into mobo


I'm documenting this since it's so basic yet such a bitch.
* had to install from iso after windows update got stuck FUCK OFF
it TOTALLY WENT ON A DIET
my 148GB drive was only using 34GB AFTER the install and cleanup
WAY better than before
took the time to move EVERYTHING I COULD to fatboy
steam base install, plus games
origin base install, plus games
visual studio ce, plus mobile, c++, game dev
but it sucked up 36GB on "system drive", assholes
they dump android stuff, ios stuff, all this bullshit there
cest la vie
installing:
chrome (like pulling teeth to get it set as default)
steam, games
origin, games
vs ce 2017 edition w/xamarin,c++,games,unity


/etc/udev/rules.d/76-mdm-net.rules
OLD NOTES:
<pre>
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.


# MDM following this to change nw interface names:  
drives and partitions:
#    http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2
* sda HDD, OLD OSes, need to wipe and reformat to ntfs; sda2 ntfs 1.1TB old??
#
* sdb
# verified MAC addresses
** sdb1 fat32 300MB wimpy-efi
# changed eth0 line to lan0
** sdb2 ntfs 147GB windows10???
# changed eth1 line to wifi0
** 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"


# PCI device 0x10de:0x0ab0 (forcedeth)
check in windows:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:4a:18:ed:58", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="lan0"
  wmic baseboard get product,Manufacturer,version,serialnumber


# PCI device 0x14e4:0x432b (wl)
boot is in /ubuntu/boot
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:bb:07:d3:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wifi0"
</pre>


Next you have to set up these weird symlinks:
|}
<pre>cd /etc/init.d
{| class="mw-collapsible mw-collapsed wikitable"
ln -s net.lo net.lan0
! BOX: case
ln -s net.lo net.wifi0</pre>
|-
|
''' Fixing boot '''
Windows Updates tend to clobber the EFI boot setup.


Now add them to runlevels:
THen you have to set BIOS to boot with "UEFI+Legacy", and put the UEFI "USB" drive first in front of the "Windows Boot Manager" one.
<pre>rc-update add net.lan0 default
rc-update add net.wifi0 default</pre>


Now add them to runlevels:
THen reboot, you should get grub.
<pre>rc-update add net.lan0 default
rc-update add net.wifi0 default</pre>


Fix the system so that only one is required for startup to work...
Go into Ubuntu and reinstall refind.
/etc/rc.conf
<pre>rc_depend_strict="NO"</pre>


No, we're not even close to done yet...
Boot back into bios, and set back to UEFI boot. Leave the USB drive first. Reboot and yhou should get refind againFU Bill.
We have to CUT the firmware out of the proprietary driverWow.
''' Install Ubuntu '''
<pre>su -
To originally install ubuntu, I had to add [... --- nomodeset] to the boot line in the grub booter.
emerge -av b43-fwcutter # NOT THIS, DAAAMN: bcm43xx-fwcutter
emerge -av sys-firmware/b43-firmware
export FIRMWARE_INSTALL_DIR="/lib/firmware"
mkdir macbook_bcm43xx_wireless_driver
cd macbook_bcm43xx_wireless_driver
wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
tar xjf broadcom-wl-5.100.138.tar.bz2
b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o
modprobe b43
/etc/init.d/net.wifi0 start</pre>


Nope.  What a fuckbucket of retardedness.
Then I had to use a desktop 1080p monitor - the 4k Sony would not come up for some reason.
Look at the [http://blog.xfce.org/2009/07/new-laptop-aka-gentoo-on-macbook-pro-55-4/ notes this guy made] - brief but heavy - i think i need to purge b43 and get the "wl" driver working instead.


The Seiki is working fine now, go figure.
|}
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: Raspberry Pi 2 and 4k
|-
|You can override settings in /flash/config.txt; here's how, from [http://wiki.openelec.tv/index.php/Config.txt 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 [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=79330&start=25 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 [http://haydenjames.io/raspberry-pi-2-overclock/ 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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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.
{| class="mw-collapsible mw-collapsed wikitable"
! 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
|}
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
! 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
Then one day... it just stopped booting... Ten-Plus says the main board has a bad power circuit or something... sad day, MOVE ON.
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: tdm
! BOX: tdm
Line 301: Line 697:
! BOX: dune
! BOX: dune
|-
|-
| My XMBC media center and samba-based storage server
|Follow the ubuntu install.
 
We also use a StarTech AC600 ac wifi adapter.  The chipset is specified [http://www.startech.com/Networking-IO/Wireless/usb-2-ac1200-wireless-network-adapter~USB433WACDB 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
AMD
Line 324: Line 736:


|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: wimpy
|-
| My main development workstation
P8P67LE mobo Intel i5 quad core
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
|}
{| class="mw-collapsible mw-collapsed wikitable"
! BOX: wallee
|-
| My quad-boot laptop
Macbook Pro quad boot (OS X, Windows 7, Ubuntu, gentoo)
see blog entry for quad boot instructions
-- gentoo --
* see [http://en.gentoo-wiki.com/wiki/Apple_Macbook_Pro/Configuration_Files/Kernel this] for kernel parameters
** emerge microcode-ctl (and made it a module in kernel)
** also did everything else I could on this page (some EFI stuff was missing, who cares) - did i do too much?
* add m to a bunch of groups:
** for x in wheel cdrom cdrw usb video ; do gpasswd -a m $x ; done
* using Xfce (everybody's doing it)
** echo "exec startxfce4" > ~/.xinitrc
* using nvidia driver
** eselect opengl set nvidia
** run nvidia-xconfig
* using gdm
** emacs /etc/conf.d/xdm
** rc-update add xdm default
* using NetworkManager
** + consolekit (needed for applet)
** + nm-applet (for Xfce taskbar applet, where it all happens)
** + networkmanager-openconnect
* network driver: broadcom-sta
**  Checking for suitable kernel configuration options...
**  CONFIG_MAC80211:    should not be set. But it is.
**  Please check to make sure these options are set correctly.
-- to update kernel --
* under gentoo, ubunbu should already be mounted; make sure it's available at /ubuntu
* cd /usr/src/linux
* build a new kernel as usual
** make menuconfig, or make oldconfig, or whatever
** make && make modules_install
** emerge nvidia-drivers
** cp arch/x86_64/boot/bzImage /ubuntu/boot/linux-3.10.7-gentoo_oldconfig
* carefully fix up grub, ubuntu grub is being used
** we inject our gentoo boot lines into /boot/grub/grub.cfg through /etc/grub.d/11-gentoo-proxy
** which gets its information from /etc/grub.d/proxifiedScripts/gentoo
** we can modify grub directly from gentoo - you have to change both grub.cfg AND /etc/grub.d/proxifiedScripts/gentoo to keep things from getting clobbered later
** or go into ubuntu and change /etc/grub.d/proxifiedScripts/gentoo and run this...
*** grub-mkconfig >/boot/grub/grub.cfg
* reboot!
-- misc --
* heres what we need in fstab to mount ubuntu in gentoo with [mount /ubuntu]...
** mount /dev/disk/by-path/pci-0000\:00\:0b.0-scsi-0\:0\:0\:0-part5 /ubuntu
|}
|}
<!--




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




[[git]]
-->
 
[[Basic linux commands]]
 
[[Bash basics]]
 
[[Update gentoo kernel]]
 
[[Maintenance of my music collection]]
 
[[OS X basics]]
 
[[DOS basics]]
 
[[Update Boost]]
 
[[udev: Assign unique names to your devices]]
 
[[Automatically mount and unmount your devices]]
 
[[udev: Autorun programs when connecting your devices]]
 
[[Configure Eclipse]]
 
[[Configure Emacs]]
 
[[Configure MythTV]]
 
[[Basic MythTV plugin configuration]]

Latest revision as of 14:59, 31 August 2024

General tasks
MIGRATION IN PROGRESS: config distro machine migration
Start to revamp config from [machine]/[distro] to [distro]/[machine] to match scripts. It's not hard even though it's dangerous. You can do each machine separately from others. Get on it!
# DO THIS ALL IN ONE SESSION, do not log out
cd development/config
mkdir -p distro # prolly not needed
git mv machine/distro distro/machine
setup_stow.sh # repeat until it doesn't fail; check each failure to make sure it is a symlink, and simply rm them as you go

Maintenance of my music collection

Restarting everything

Add a new VM to melange - Clone a melange VM - Linux barebones quickstart

Scripts - Add a user - Linux permissions - DNS

Tune linux performance

Turn off ubuntu gnome screenlock - Set ubuntu default browser

Add a drive - Back up drive - Check disk - Check disk speed

Bash basics - OS X basics - DOS basics - Update gentoo kernel

SSL certificate instructions - Networking

systemd - udev: Assign unique names to your devices

Automatically mount and unmount your devices

udev: Autorun programs when connecting your devices

master keyboard shortcuts map
See .i3/config.

Typically you can press ctrl-shift-K to open it in editor.

The local file usually points to the common version, here:

~/development/config/common/home/m/.i3/config
Upgrade Ubuntu
To update ubuntu from an i3 terminal:
su -
apt-get update        # Fetches the list of available updates
apt-get upgrade       # Strictly upgrades the current package
apt-get dist-upgrade  # Installs updates (new major versions, i think)
update-manager -d    # kick off the update manager to migrate to new release when available

Or just call the script that does the same thing:

upgrade_ubuntu

I'm currently migrating everything to 16.04 Xenial Xerus.

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
Increase max open file handles
I do it here:
~/development/config/common/etc/sysctl.d/20_MDM_sysctl.conf

That basically sets the user max when I do my stow thing. Alternatively, you can set it directly in

/etc/sysctl.conf
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

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 symbolic links
Windows symlinks - needed for config files, svn overlay, etc.

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
Windows 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.

Windows command prompt FULL SCREEN
Type cmd in start search box and right-click on the cmd shortcut which appears in the results. Select Run CMD as administrator.

Next, in the command prompt, type wmic and hit Enter. Now try to maximize it! Close it and again open it. It will open as a maximized window! You may have to ensure that the Quick Edit Mode in the Options tab is checked.

Boxes

Bitpost - Melange - Cast - Bluto - Cobra - Case - Viper - Wimpy

Melange VMs

AbtDev1 - Positronic - Morosoph - Glam - Hive - Bandit - Matryoshka - Hoard - Tornados - Matcha - Windozer

Devices and Hardware

My server rack

Cable Modem - Sony 65" TV - TCL 55' TV - ASUS router

IOTs: lime - carambola - Arduino

Flash Drives - Stadia controller - Logitech F710 Controller

Aeron chair - Jetson Electric Bike

Third Party Services

Cloudflare | LetsEncrypt | Sendgrid

Hardware notes
NO TEARING on Sony driven by nvidia (currently, case)
It's not really about Kodi settings, you have to set up nvidia settings, and they are HARD to get to stick because it's "automatic" but broken.
  • Ensure nvidia-settings is set to 4k at 60fps refresh rate - YOU HAVE TO DO THIS ON EVERY REBOOT until we set up an xorg.conf FML
  • Ensure Kodi has "sync video to display" turned ON
Copy from linux nautilus to android "Operation unsupported"
Weird assed linux prevents "SMB to USB" copies, FUCKOFF. Workaround is to copy to local drive, then copy to phone. Wow that is sickening.
Old notes and dead boxes
Oontz turn on dual pairing
Turn them both on. One should be paired with your phone, the other should be flashing blue, trying to connect.

On the Play Control Speaker (speaker with solid Blue Light) press and hold down the Play/Pause button for 5 seconds until the flashing White Light appears and the speaker says “Dual Pairing”. - The Play Control Speaker will then connect to the second speaker.

There is NO WAY you can guess this. You'll be back here to re-learn...

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 &
Fix things after IP changes
Time Warner seems to keep giving the same IP back to my main linux router/server, as long as the NIC card doesn't change. It also happened when they upgraded my service (and started labeling my IP as dynamic to SpamHaus, fuckers...).

If it changes, fix these things:

  • Update the IP at 1and1.com for ALL domains, bleh...
  • mod evasive has a whitelist, it needs the actual IP, bleh...
-rw-r--r-- 1 m m 1.1K Mar 28 22:13 /home/m/config/etc/apache2/modules.d/10_mod_evasive.conf
  • reset cable modem (see specific steps)
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: bitpost
Update gentoo kernel
drives
My primary server at Blount St
   bitpost ~ # df
   Filesystem     1G-blocks  Used Available Use% Mounted on
   /dev/sda7           171G  143G       19G  89% /
   /dev/sdb1          3668G 3343G      326G  92% /spiceflow/tvmind-4g-mel
   /dev/sdc1          5545G 3585G     1681G  69% /spiceflow/film-6tb-bp
   /dev/md0           3668G 1578G     1904G  46% /spiceflow/softraid
    (^sdd+sde)
   /dev/sdf1          3667G    1G     3667G   1% /spiceflow/hare-s3-4t

   bitpost ~ # lsblk                                                         
   NAME   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
   sda      8:0    0 232.9G  0 disk  
   ├─sda1   8:1    0   190M  0 part  
   ├─sda5   8:5    0   3.8G  0 part  [SWAP]
   ├─sda6   8:6    0  55.9G  0 part  
   └─sda7   8:7    0   173G  0 part  /
   sdb      8:16   0   3.7T  0 disk  
   └─sdb1   8:17   0   3.7T  0 part  /spiceflow/tvmind-4g-mel
   sdc      8:32   0   5.5T  0 disk  
   └─sdc1   8:33   0   5.5T  0 part  /spiceflow/film-6tb-bp
   sdd      8:48   0   3.7T  0 disk  
   └─md0    9:0    0   3.7T  0 raid1 /spiceflow/softraid
   sde      8:64   0   3.7T  0 disk  
   └─md0    9:0    0   3.7T  0 raid1 /spiceflow/softraid
   sdf      8:80   0   3.7T  0 disk  
   └─sdf1   8:81   0   3.7T  0 part  /spiceflow/hare-s3-4t

2019/06/01 spicey-3g died just as its replacement arrived, cest la vie. lost a bit of everything, move on. replaced with hare-s3-4t:

   Jun  2 17:40:54 bitpost kernel: ata8: hard resetting link
   Jun  2 17:40:55 bitpost kernel: ata8: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
   Jun  2 17:40:55 bitpost kernel: ata8.00: supports DRM functions and may not be fully accessible
   Jun  2 17:40:55 bitpost kernel: ata8.00: ATA-11: Samsung SSD 860 QVO 4TB, RVQ01B6Q, max UDMA/133
   Jun  2 17:40:55 bitpost kernel: ata8.00: 7814037168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
   Jun  2 17:40:55 bitpost kernel: ata8.00: supports DRM functions and may not be fully accessible
   Jun  2 17:40:55 bitpost kernel: ata8.00: configured for UDMA/133
   Jun  2 17:40:55 bitpost kernel: ata8: EH complete
   Jun  2 17:40:55 bitpost kernel: scsi 7:0:0:0: Direct-Access     ATA      Samsung SSD 860  1B6Q PQ: 0 ANSI: 5
   Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: Attached scsi generic sg5 type 0
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Write Protect is off
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
   Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
   Jun  2 17:40:55 bitpost kernel: ata8.00: Enabling discard_zeroes_data
   Jun  2 17:40:55 bitpost kernel: sd 7:0:0:0: [sdf] Attached SCSI disk

Before, 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)
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
BOX: viper
2016 ASUS Republic of Gaming laptop
Boot from USB
I had to flip bios switches:
  • Disable secure boot
  • Enable CSM (some compatibility bullshit)
  • Reboot, THEN USB will show in boot options, just hit del to enter bios, go to save page, and select the USB you want to override on next boot. PITA!
Trackpad
  • Toggle on/off:
toggle_trackpad.sh
  • Dynamically adjust:
xinput list # recently, "Elan Touchpad" is #14
xinput list-props 14
xinput --set-prop 14 "Trackpad Sensitivity" 55 # speed (55 good, 75 faster)
xinput --set-prop 14 "Trackpad Touch Pressure" 6 1 # finger (6 1) vs thumb (12 1)
  • Persist settings here (note they kinda match up but diff names, sigh):
/etc/X11/xorg.conf.d/60-synaptics.conf
BOX: wimpy
My main gaming machine

P8P67LE mobo Intel i5 quad core website

  • HARDWARE:
    • Plug keyboard/mouse hub into TOP USB SLOT in back or BIOS won't recognize it
    • Make sure you plug Vive usb into a USB 3.0 slot
  • ON BOOT:
    • REMOVE USB KVM or the keyboard won't work - most of the time that's ok because we let it go through
    • IF you boot into ubuntu, the USB hub didn't seem to work, i had to plug right into mobo
  • had to install from iso after windows update got stuck FUCK OFF
	it TOTALLY WENT ON A DIET
	my 148GB drive was only using 34GB AFTER the install and cleanup
		WAY better than before
took the time to move EVERYTHING I COULD to fatboy
	steam base install, plus games
	origin base install, plus games
	visual studio ce, plus mobile, c++, game dev
		but it sucked up 36GB on "system drive", assholes
		they dump android stuff, ios stuff, all this bullshit there
		cest la vie
installing:
	chrome (like pulling teeth to get it set as default)
	steam, games
	origin, games
	vs ce 2017 edition w/xamarin,c++,games,unity

OLD NOTES:

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

BOX: case

Fixing boot Windows Updates tend to clobber the EFI boot setup.

THen you have to set BIOS to boot with "UEFI+Legacy", and put the UEFI "USB" drive first in front of the "Windows Boot Manager" one.

THen reboot, you should get grub.

Go into Ubuntu and reinstall refind.

Boot back into bios, and set back to UEFI boot. Leave the USB drive first. Reboot and yhou should get refind again. FU Bill. Install Ubuntu To originally 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.

The Seiki is working fine now, go figure.

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: 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

Then one day... it just stopped booting... Ten-Plus says the main board has a bad power circuit or something... sad day, MOVE ON.

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