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.
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?)
On first boot sshd will generate the host-specific keys so it'll take a minute.
Discover the RPi's IP address with nmapfe or your router.
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
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 |
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
Post a Comment