3D Printed Raspberry Pi Rack Mount with Heat-sink (Passive Cooling)

With now 6 Raspberry Pis lying (hanging) around inside and around my server rack I’ve started to look for a nice and clean way to mount them in my server rack. On thingiverse I’ve seen a few 3D printed Raspberry Pi brackets and I immediately liked the idea; but as I wanted a simple design with the ability to add a heat sink, I had to start from scratch. Also, at the time I started the design, there weren’t any brackets for the newest Raspberry Pi 4. So, the result of my effort can be seen here:

After a about half a dozen iterations over the last two months, the following 3D print is ready to be equipped with heat sinks and mounted in my server rack:

I’ve prepared two versions of the RasPi Rack holder, one for the the older Raspberry Pi 3 Model and one for the Rasperry Pi 4. The STL files for 3D printing are available for download and licensed under CC-BY-SA 4.0: RasPi_RackMount.zip

The heat sink was bought on ebay (link) and is the upper half of a passive cooled aluminium Raspberry Pi case.

The 2 HE rack panel was bought at Musicstore.de, but I’ve also seen them on ebay and Amazon. They also sell small panels to cover 1 or 2 empty slots, if necessary. The 2 HE panel can take up to 10 modules (i.e. Raspberry Pis).

The RasPi’s are currently all powered from the back side, each with their own power supply. I’m currently planning on inserting a 5x USB charger into one of the module slots to power up to five at the same time.

Started to build my Raspberry Pi PiDrive System (for RetroPie)

I’ve started to rework my Raspberry Pi ‘dial-up’ interface. Instead of just handling my external VPN and SSH connections I’ve extended it to also function as an intermediate file server and Git repository (both via NFS+SSH). I’ve also inserted the Raspberry Pi into a new case and added a 1 TB 2,5″ drive. I think it can handle additional load so I plan to extend its capabilities to also serve as a RetroPie console.

By the way: the case and the connector cable between the drive and the Pi are both from WD Labs. The hard drive is not a PiDrive but a refurbished USB 3.0 1 TB disk (it was a recertified My Passport Ultra) before I’ve dismantled it. For me it was cheaper that way. If you’re looking for a similar setup and need an additional power supply and SD card maybe you should think about buying a Nextcloud Box (free shipping; handled by WD). You might not need to use its ‘cloud’ functionality but still get all hardware I’ve previously mentioned which I think is a pretty good bargain.

Homemade minimal Raspberry Pi (Raspbian) image

I have to admit that I’m a big fan of single-board computers for specific tasks like home-automatation, backup systems, network gateways, or file-sharing. I also like the approach of the Raspberry Pi Foundation to provide an image file with Raspbian (an adapted Debian) for easy use. For most people out there it is the best way to fetch an SD-Card with a capacity of at least 4 GBytes, download and copy the Raspbian image onto the card. I have a few unused 1 and 2 GByte SD-Cards lying around which should be sufficient for my tasks but are too small for the ‘generic’ Raspbian image. So I had to create my own minimalistic Raspbian installation. Here is a step-by-step example of the creation process.

I started with the installation of a few later required packages. I’m pretty sure this list is incomplete as I’ve already had quite a lot dev-tool packages installed before…

sudo aptitude install qemu-user-static \
binfmt-support fakeroot debootstrap git

To get Qemu running to support armhf I had to add a parameter to itc configuration file:

echo "EXTRA_OPTS=\"-L/usr/lib/arm-linux-gnueabihf\"" > /etc/qemu-binfmt.conf

I used “/tmp/” as my working directory which might not be the best location (temporary, as the name says). Feel free to use another dir, but you might need to keep an eye on the (root) access permissions…

cd /tmp/
mkdir raspi raspi/bootfs
cd raspi

Next I downloaded a minimalistic list of Raspian packages that will later go onto the root partition. I’ve tried to avoid working with root permissions as far as possible (therefore ‘fakeroot’).

fakeroot debootstrap --foreign --no-check-gpg --include=ca-certificates --arch=armhf testing rootfs http://archive.raspbian.com/raspbian

No we need to (temporarily) add some arm binaries to the root directory.

cp $(which qemu-arm-static) rootfs/usr/bin

The following step will start the actual installation process of the Raspian packages. For some reason I was not able to continue at this point without root permissions. (Any tips to fix this are welcome.)

sudo chown root.root rootfs -R

sudo chroot rootfs/ \
/debootstrap/debootstrap --second-stage --verbose

You will need some of the Raspberry Pi firmware files. The following commands download and install them . The Git repository is huge (3.1 GB), so this might take some time…

git clone \

sudo cp -r firmware/hardfp/opt/* rootfs/opt/

At this point you could create a custom kernel image based on the downloaded files. In my opinion the stock kernel is just fine so I just used it as is:

mkdir -p rootfs/lib/modules/

sudo cp -r firmware/modules/* rootfs/lib/modules/

Create the boot partition (i.e. copy the necessary files):

mkdir bootfs
cp -r firmware/boot/* bootfs/

Next we can make some adaptions to the future image files: set a new root password, hostname, adapt the sources list, etc…

sudo chroot rootfs/ /usr/bin/passwd

vim rootfs/etc/hostname

cat >> rootfs/etc/apt/sources.list deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi

It might also be a good idea to adapt the future system to your local settings, e.g. keyboard layout.

sudo chroot rootfs/ apt-get update

chroot rootfs/ apt-get install console-data \ 
console-common console-setup tzdata most locales keyboard-configuration

sudo chroot rootfs/ dpkg-reconfigure locales

sudo chroot rootfs/ dpkg-reconfigure \

sudo chroot rootfs/ dpkg-reconfigure tzdata

Now we can do some clean-up:

sudo rm rootfs/usr/bin/qemu-arm-static

Next step is the creation of the actual boot and root partitions on a SD-Card. I’ve not documented these steps in detail as everyone has a different favourite partition manager. This step can be done with fdisk, (g)parted, or other tools.

You have to create two partitions on your SD-Card. For the boot partition 64 MB are sufficient, the remaining space is used for the root partition. The boot partition needs to be a FAT32 partition. The nice thing about the Raspberry Pi is, that boots of the first FAT32 partition without further installing a boot block or so.

Here an example how a 2 GB SD-Card could look like:

fdisk -l /dev/sdd
  /dev/sdd1 2048 133119 65536 b W95 FAT32
  /dev/sdd2 133120 3987455 1927168 83 Linux

Now we can copy the files from the two directories we previously created onto the two SD-Card partitions (you might need to mount them first) and test the card.

cp -R rootfs/* /media/USER/root/ && sync
cp -R bootfs/* /media/USER/boot/ && sync

I also have created an image file, mounted is (as a block device), partitioned it similar to the steps above. But I have not yet documented these steps. Might be added in a future update…

Raspberry Pi – Chopped SD-Card adapter for a smaller form factor

This is just a small hack inspired by a post I read the Raspberry Pi forum.

A few weeks ago I bought a combined Micro-SD Card and USB-Adapter on eBay (from China).

SD-Card Adapter


I opened it and cut off  the USB-Adapter part as I am only interested in the SD-Card part of the adapter.

SD-Card Adapter w/ USB part chopped off

The result may not be the visually most convincing hack but it works perfect and reduces the chance of accidently pulling out the SD-Card.

SD-Card Adapter Hack