This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:rpi:start [2017/12/19 22:41] rk4n3 |
tech:rpi:start [2018/12/10 18:14] (current) rk4n3 |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <typo fs:xx-large; fw: bold;>Raspberry Pi</typo> | ||
+ | ====== RaspEX ====== | ||
+ | ===== Installation ===== | ||
+ | * Write image onto MicroSD | ||
+ | * Boot, take note of MAC addresses and add to LAN DHCP/DNS accordingly | ||
+ | * Run the ''resize_rootfs.sh'' script as ''root'' (its in ''/root'') | ||
+ | * Change hostname (in both ''/etc/hostname'' and ''/etc/hosts'') and reboot | ||
+ | ===== Initialization Tips & Tricks ===== | ||
+ | ==== Date/Time ==== | ||
+ | * Set timezone: ''dpkg-reconfigure tzdata'' | ||
+ | * Calibrate date/time: ''ntpdate us.pool.ntp.org'' | ||
+ | * Edit ''/etc/ntp.conf'' and start NTPD with ''/etc/init.d/ntp start'' | ||
+ | ==== Migrate user(s) ==== | ||
+ | * Create desired login(s)<code>groupadd -g 1xx0 yourgroup | ||
+ | useradd -u 1xx0 -g 1xx0 -d /home/yourlogin -s /bin/bash -c "Your Name" -m yourlogin</code> | ||
+ | * Add login(s) to groups (use ''id -a raspex'' to identify list of groups needed for admin login)<code>usermod -a -G list,of,group,names yourlogin | ||
+ | </code> | ||
+ | * Add login to ''/etc/sudoers'' | ||
+ | * Delete default user: ''deluser raspex ; rm -rf /home/raspex'' | ||
+ | ==== Disable Auto-Login ==== | ||
+ | Edit ''/etc/slim.conf'' and change the ''auto_login'' value to ''no'' \\ | ||
+ | ==== Details ... ==== | ||
+ | * Wallpaper location: ''/usr/share/images/bunsen/wallpapers/default'' | ||
+ | * Disable conky: ''apt remove --purge conky conky-all'' | ||
+ | ==== Packages ==== | ||
+ | * ''apt install xscreensaver'' | ||
+ | * ''apt install git'' | ||
+ | |||
====== Notes ====== | ====== Notes ====== | ||
+ | ===== Basic Installation ===== | ||
+ | * Get raspbian image (typically a ZIP from [[https://www.raspberrypi.org/downloads/raspbian]]) | ||
+ | * Unzip image, write to SD card:<code>dd if=raspbiandownload.img of=/dev/sdX bs=4M conv=fsync</code> | ||
+ | * Default login is ''pi'' with password ''raspberry'' | ||
===== misc ===== | ===== misc ===== | ||
* Change root and pi passwords | * Change root and pi passwords | ||
+ | * Enable SSH at boot, use raspi-config in the "Interfacing Options" section | ||
* Add user, ensure groups, and sudoers | * Add user, ensure groups, and sudoers | ||
* Update host name in: | * Update host name in: | ||
* ''/etc/hostname'' | * ''/etc/hostname'' | ||
* ''/etc/hosts'' | * ''/etc/hosts'' | ||
- | * Resize root partition, reboot, resize fs | + | * If necesary, resize root partition, reboot, resize fs |
- | * Make a copy of /var to /home/sys | + | |
* Install (via apt-get) some basics: | * Install (via apt-get) some basics: | ||
* ksh | * ksh | ||
- | * rsync | ||
- | * xterm | ||
* htop | * htop | ||
+ | * xterm | ||
+ | * rsync | ||
* git | * git | ||
* libudev-dev | * libudev-dev | ||
Line 22: | Line 54: | ||
* libtool | * libtool | ||
* xfe (optional) | * xfe (optional) | ||
+ | |||
+ | ===== MythTV Front End ===== | ||
+ | See original for complete reference: [[https://www.mythtv.org/wiki/Raspberry_Pi]] | ||
+ | * Configure gpu_mem=256 using ''raspi-config'' | ||
+ | * Configure this to be run at each boot (put in ''/etc/rc.local''):<code>echo "performance" | /usr/bin/tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor</code> | ||
+ | * Disable pulseaudio | ||
+ | * In ''/etc/pulse/client.conf'' set ''autospawn=no'' and ''daemon-binary=/bin/true'' | ||
+ | * Install MythTV Light per instructions at [[https://www.mythtv.org/wiki/MythTV_Light]] | ||
+ | * In ''/etc/apt/sources.list'' add a line like:<code>deb http://dl.bintray.com/bennettpeter/deb stretch myth28</code> | ||
+ | * Add key:<code>wget -O - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | apt-key add -</code> | ||
+ | * ''apt update'' | ||
+ | * ''apt install mythtv-light'' | ||
+ | * ''apt install mythplugins-light'' | ||
+ | ===== USB Relay ===== | ||
+ | * Make a copy of /var to /home/sys | ||
* Prune /home/sys/var | * Prune /home/sys/var | ||
* Set up tmpfs mounts, like (pay attention to mode and size): \\ ''tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0'' | * Set up tmpfs mounts, like (pay attention to mode and size): \\ ''tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0'' | ||
Line 28: | Line 75: | ||
* /var/log, mode=0755, size=100M | * /var/log, mode=0755, size=100M | ||
* /var/spool/mqueue, mode=700, gid=12, size=30M | * /var/spool/mqueue, mode=700, gid=12, size=30M | ||
- | * Clone source for USB relay control | + | * Clone source for USB relay control: <code>git clone git://github.com/signal11/hidapi.git |
- | * ''git://github.com/signal11/hidapi.git'' | + | git clone https://github.com/darrylb123/usbrelay.git</code> |
- | * ''git clone https://github.com/darrylb123/usbrelay.git'' | + | |
* Build HIDAPI, cd to source dir and:<code>./bootstrap | * Build HIDAPI, cd to source dir and:<code>./bootstrap | ||
./configure --prefix=/usr --enable-testgui | ./configure --prefix=/usr --enable-testgui | ||
Line 37: | Line 83: | ||
You need HIDAPI and USBRELAY: \\ | You need HIDAPI and USBRELAY: \\ | ||
- | ''git clone git://github.com/signal11/hidapi.git'' \\ | + | <code>git clone git://github.com/signal11/hidapi.git</code> |
Check out the readme, and install dependencies before installing. \\ | Check out the readme, and install dependencies before installing. \\ | ||
- | then: ''git clone https://github.com/darrylb123/usbrelay.git'' \\ | + | then: <code>git clone https://github.com/darrylb123/usbrelay.git</code> |
- | Then, in usbrelay folder: ''gcc -o usbrelay usbrelay.c -lhidapi-libusb'' \\ | + | |
- | Then do "ldconfig" \\ | + | Then, in usbrelay folder: <code>gcc -o usbrelay usbrelay.c -lhidapi-libusb</code> |
+ | Then do: <code>ldconfig</code> | ||
Read more here: | Read more here: |