Category Archives: Linux

Building GPS Clock on Pi w/ Debian Stretch

Start with Raspbian Stretch Lite

Install most current packages:
apt-get update
apt-get upgrade
apt-get dist-upgrade

Clean up packages:
aptitude search ‘~o’
apt-get autoremove

reboot

Test GPS Sentences:
cat /dev/ttyAMA0

Limit GPS Sentences:
#GPZDA
/bin/echo -e ‘$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0*29\r\n’ > /dev/ttyAMA0

#GPRMC
/bin/echo -e ‘$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n’ > /dev/ttyAMA0

Configure Pi:
raspi-config
configure local >> [*] en_US.UTF-8 UTF-8
timezone >> Chicago
advanced >> Expand filesystem

reboot

Get and Unpack NTP source:
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p12.tar.gz
tar -zxvf ntp-4.2.8p12.tar.gz

Compile NTP:
apt-get install libcap-dev

./configure –disable-all-clocks –disable-parse-clocks –without-lineeditlibs –enable-NMEA –enable-LOCAL-CLOCK –enable-SHM –enable-linuxcaps –enable-ATOM –enable-pps –with-sntp=no –prefix=/usr

Debian Upgrade 8 to 9

Note: Disable Network Bonding at switch and OS


# aptitude search '~o'

# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

# dpkg -C

# apt-mark showhold

/etc/apt/sources.list
STRETCH:
deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main

# apt-get update

# apt list --upgradable

# apt-get upgrade
# apt-get dist-upgrade

# aptitude search '~o'
# aptitude purge ~o (removes obsolete packages)

# apt-get autoremove

Remove ^rc packages
# dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

# reboot

Passbox

usage: passbox [action]

Passbox – command line password manager utility

ACTIONS

add-field Update an existing entry to add additional fields to
delete Remove an entry from the password database
get Get a particular password entry by it’s name
generate Generate a new random password
new Prompt to create a new passbox entry
remove-field Update an existing entry to remove additional fields
search Search the password database for a particular string, returns all matching entries
update Update an existing entry in the password database

Xcompile RPI Kernel on Debian

Building an RPI 3.6.11 kernel with PPS support on GPIO pin 24.

Straight forward instructions with no BS and no fancy crap.

PSA: To people writing how-to’s, keep your shiny Linux CLI kung-fu on your resume and off your blog.

If you are interested in compiling a custom kernel for other reasons just skip/replace the PPS specific junk below.

Install Debian.

Add Emdebian to sources.list:

# Xcompile Toolchain
deb http://www.emdebian.org/debian/ squeeze main

Install the packages we need:

apt-get install emdebian-archive-keyring
apt-get install gcc-4.4-arm-linux-gnueabi

Create directories for your build:

mkdir /admin
mount 10.1.1.104:/NAS/admin /admin