Skip to main content

RPi headless and keyboardless Gentoo install

The goal here is to setup Gentoo Linux on an SDcard for my Raspberry Pi model B without display or USB keyboard.  Yep, I didn't have a HDMI cable and my USB keyboard died a long time ago...

I followed this Quick Install Guide mostly.  I'll outline what I had to do different than the guide.

I've been meaning to set up my distribution of choice on a RPi, and my work needs a little server upgrade to host some files securely.  Yes!  Now I finally have a good enough reason.

Raspberry Pi model B with only power and LAN.

Following the Guide

Steps 1 through 3 can be done normally on a Linux system, as this is just prepping the SDcard.

Parts of Step 4 need to be done before booting, so you can ssh in.  I couldn't chroot into the sdcard like I'm used to in a Gentoo linux install.  Kept getting /bin/bash Exec errors.  (I think it has to do with the different archs (armv6 vs x86) and the incampatible binaries?)

Setting the root password manually

Use the command "mkpasswd", enter in a password, and put its DES encrypted output in the /etc/shadow line for root:
root:<output-of-mkpasswd-command>:10770:0:::::

SSHD on boot

The sshd service needs to added to the default runlevel, but we can't run rc-update because no chroot and no keyboard.  The idea here is to manually add the service, via a symbolic link.
ln -s /etc/init.d/sshd /etc/runlevels/default/sshd
On first boot sshd will generate the host-specific keys so it'll take a minute.

Networking on boot?

I actually had networking (net.eth0) come up automatically as the very last thing before the local login prompt.  It was a nice surprise!  But you can symlink net.eth0 just like we did for sshd.

Discover the RPi's IP address with nmapfe or your router.

First boot

It might take a bit for the ACT light to quiet down.  Then you should be able to ssh in as root and the password (not the encrypted one).  You could always plug in a composite video cable to an old TV to check the boot messages (I know you've got a few in your basement).

Now you can configure your system like the guide suggests.  I reduced the GPU memory to 16megs, setup ntp and swclock, and a few others.  You can setup cross-compiling and distcc, which is covered under the RPi cross building pages.

One thing I noticed when I checked the bootup logs was the need for firewalld.  Might want to look into that.


Now onto making this into a samba, mysql, and backup server.

~JWilly

Comments

Popular posts from this blog

PB Pro Mini

No, it isn't Lead, nor is it Peanut Butter.  It is the 'B' version of the prolific ATmega328P microcontroller which started all this maker craziness off! Top view of PB Pro Mini Description This is a minimal microcontroller board with only a voltage reg, crystal, I2C pull-ups, LEDs and the chip itself.  The goal here is to reduce costs while hosting the beefy 328PB! This is based on, and pin compatible with, the Arduino Pro Mini 5v/16MHz from  Sparkfun . Notable, not-so-minor improvements for the 'B' version: 2 UARTs 2 I2Cs (TWI) 2 SPI Qtouch 5 Timers (with OC, IC, and PWM) Everything else is about the same.  You should be aware the clock driver on the chip is a low-power version, but this board and crystal operate at 16MHz just fine at 5V.  The Arduino library I've been using for the PB has been working without a problem! Getting Started You'll need a FTDI Friend  or FTDI Cable  to program this as there is no seconda...

Update to USBmicroISP: 6pin and 10pin headers

Actually using my USBmicroISP with microcontrollers other than Arduino Uno's led me to fix a udev rule issue with my Gentoo Linux laptop.  I was getting Permission Denied when I was trying to use avrdude as a normal user.  Yes, my user is part of the 'uucp' group... Background Some background on the Arduino ISP connector.  It is much different than the 10-pin AVR connector... 6-pin ICSP cable pinout.  NOTE: Numbers refer to ATtiny45/85 pins, not ICSP! Arduino ISP pinout. Notice the vertical line next to pin 1, which appears in silkscreen on the PCBs. Redboard ISP pinout.  Obviously the same as UNO.  Notice pin 1 location on upper-left, with horizontal white silk. My USBmicroISP has the cables coming off the IDC differently, but the key is in the correct orientation to the pinout in the top picture! (Please disregard numbering on first picture for ICSP purposes)  Usually the key and wires are facing inward (left side on 2nd and 3rd ...

Harvey Barnstead SterileMax Retrofit

I recently did up a replacement controller PCB for a customer who was having runtime issues.  The replacement PCB and firmware exactly replaces the old 68k controller system.  It is a drop-in replacement with exactly compatible connectors, power supply, and input and output signalling. The SterileMax was a prolific autoclave, and can economically fulfill your needs. If you have this version or similar, you can use my replacement. The replacement PCB is MUCH smaller than the OEM. Replacement controller for the PC1277X1, top-side. The PCB is about 1/3 the size of the original.  It helps to not use any DIP parts. Schematic for the controller. If you're interested in this design or a slightly modified version for your sterilizer, comment below and I can hook you up. The main issue this solved was over-pressure in the chamber during a run.  The NVSRAM's battery died and it lost all the configuration data.  Once this happened the system w...