[SOLVED by Steen &Turner 2016-07-17]
This new design is based on a Raspberry Pi 3B, an HDhomerun connect, and a Seagate Expansion 8TB disk with USB hub. UPDATE 2016-10-03: An externally-powered 1TB external disk would be quite adequate, but it may be difficult to find a hard disk smaller than 5TB that is externally-powered.
Related scrolls and resources
- If frozen out of ssh on a RPi, attach a display and keyboard, boot, see the GUI, type Ctrl-Alt-F1 to move to the command line on the second tty, and log in with any user. This works even if the home directory for the user is not available. The system creates a temporary home directory.
- It is useful to have a root user with a password, because root is in /root, not in /home.
- Oddly, Red Hen is unable to boot into safe mode using only keyboard combinations. Websites report that safe mode is possible if two RPi pins are connected, but Red Hen has not tried that.
A list of what has already been done to a microSD card (or its image) before you receive it from Red Hen
- Format a new 32GB microSD card. Install on it the latest debian linux release for Raspberry Pi.
- Eject and remove the microSD card and insert it into the RPi. For the sake of this tutorial, let's call your RPi "redX."
- 2016-01-07: UPDATE about ssh: As of the November 2016 release, Raspbian has the SSH server disabled by default. You will have to enable it manually. This is done using raspi-config: Enter sudo raspi-config in the terminal, first select Interfacing options, then navigate to ssh, press Enter and select Enable or disable ssh server. For headless setup, SSH can be enabled by placing a file named 'ssh', without any extension, onto the boot partition of the SD card.
- You will use a computer with a terminal app to connect to the RPi. For this tutorial, let's call that computer "Mithras."
- Connect Mithras to the Rpi redX with an ethernet cable. Connect electrical power to redX. RedX will now be on your local network. Try to find the RPi's IP address on the local network. Tools include
- PiFinder (which will provide the IP address and the MAC address)
- Issuing the command arp -a from Mithras
- Issuing netstat-n from Mithras
- etc. . . . .
- Let's suppose the IP address is 10.0.1.16
- From the terminal on Mithras, log in to redX by issuing the command
- ssh email@example.com. If that doesn't work, and you think that the microSD card thinks that its hostname is, e.g., redalpha, then try ssh firstname.lastname@example.org
- If you are able to log in, excellent. If not, consider connecting through ssh vnc (instructions to come), or, in a pinch, by connecting a keyboard and monitor directly to redX.
- If it has not already been done, change the RPi hostname to, e.g., redX. Instructions at http://www.howtogeek.com/167195/how-to-change-your-raspberry-pi-or-other-linux-devices-hostname/
- If it has not already been done, add users and shudders. Instructions at https://www.raspberrypi.org/documentation/linux/usage/users.md
- If it has not already been done, configure wifi (optional), see command-line instructions. Note: if the wifi network has no password, then instead of the line psk="PASSWORD," you need a line key_mgmt=NONE (More discussion below, under editing the config file.) Configuring wifi can also be done through the GUI desktop on the RPi, see instructions. That GUI desktop has a Raspberry Pi Configuration Tool that allows one to change many settings on the pi.
If the RPi does not have wifi, or you don't want to use it, edit /etc/modprobe.d/raspi-blacklist.conf and add:
-- and/or add this to csa's crontab:
@reboot sudo ifdown wlan0
- Reboot. From here on out, you should be able to connect with ssh csa@redX.local
- Locate, on the most recently installed Capture Station (or elsewhere—ask Steen or Turner), a top-level directory called /nest, which contains the software and scripts that Red Hen adds to the latest Debian system. Copy the /nest directory to Mithras so you can edit the /nest files on Mithras.
- Suppose the most recently installed RPi Capture Station is "redalpha." On Mithras, find /nest/cfg/red.config or, lacking that, /nest/cfg/red.config-redalpha. It will look something like this:
# Red Hen configuration file for redalpha
# Established 2016-07-06
location="Cleveland, Ohio, US, at CWRU"
- copy this file to a new file titled redhen.config-redX in the same directory and edit this file appropriately. The new capture station should not need wifi since it will be connected by wired ethernet, but if you have connected redX to wifi, edit the essid and key_mgmt and psk lines in redhen.config-redX. If there is no password on the wifi, leave key_mgmt=NONE in place. If there is a password, delete or comment out (i.e. put a # in front of the line) the key_mgmt=NONE line, and remove the # at the beginning of the psk="" line and place the password between the two quotation marks of that line. Save the file as redhen.config-redX and then copy that file to be the new redhen.config file, i.e. /nest/cfg/red.config.
- As user csa@redhenX.local, copy the /nest directory on Mithras to a new /nest directory on redX.
- Establish the appropriate Red Hen tunnel
What needs to be done after you receive a microSD card or its image from Red Hen
- Insert the microSD card into your RPi. (If you have received only an image, format the microSD card and flash it with the image, eject the card and insert it into your RPi.)
- Connect the RPi by ethernet cable to the local ethernet network. Connect the RPi to electrical power. From some other computer, e.g. "Mithras," with a terminal on the local ethernet network, confirm that you can log in with ssh csa@redX.local. If you can't, create a direct ethernet connection between Mitras and your RPi, and try to change settings so that redX will be recognized on the local ethernet network.
- Make any other local settings to redX that could not be made before the microSD card was configured by the Red Hen directors.
- Connect the HDhomerun to ethernet on the same local network and to power.
- Connect the externally-powered external USB hard drive to the RPi and to electrical power.
- At this point, the Red Hen staff can take over remotely, to do . . .
- For more detail on configuring the HDhomerun and the hard drive, see Portugal Capture Station and Slick Capture.
- Establish automatic scheduling. Use schedule:
csa@redalpha:~ $ schedule -h
Update the recording schedule in crontab using the downloaded schedule from xmltv.
Syntax (use s to simulate results, without changing the crontab):
schedule <network name or channel number> <show title> [<tuner #>] [<teletext page #>] [<comment>] [s]
Enclose any element with a space in quotes:
schedule "RTP 1" "Telejornal" 1 885 "National evening news" s
schedule 1 "Telejornal" 1 885 "National evening news" s
The last four fields are optional.
The script is designed to run from crontab but can be run manually.
If you run this script for a show, updating that show will be added to crontab.
- Put data transmission scripts into place from redX to UCLA
- . . . . .