Mail archive

[alpine-devel] Installing to RPI SD Card

From: Peter Bui <>
Date: Wed, 4 Feb 2015 23:06:20 -0600


My question is what is the best way to use the whole SD card on a
Raspberry PI?

I've recently setup Alpine Linux on a Raspberry Pi using the 3.1.2
tarball. I have figured out how to use setup-alpine and lbu to
customize the image (or rather create an overlay), but I've run into the
issue of not having enough memory to hold all of the software I wish to

As you may know, the RPI has a low amount of RAM (my B+ has 512MB).
Since the rootfs is stored in memory, I am limited to a root filesystem
of 218.7M (according to df -h). This makes it impossible to install
larger packages such as xorg and firefox, or even just alpine-sdk (I
wanted to build some new packages for the RPI).

One workaround I've played around is to partition my SD Card so that
mmcblk0p1 is the vfat boot partition and then have mmcblk0p2 be an ext4
partition. At the moment, I'm playing around with chrooting into this
second partition which is larger (5GB), but this seems messy and

Ideally, I would prefer to just install Alpine Linux to the SD Card and
use the second partition as the root (keeping the first as a boot
partition b/c I believe the bootloader on the RPI requires that).

That said, I haven't figured out the appropriate settings for
cmdline.txt or config.txt to tell the kernel to use /dev/mmcblk0p2 as
the root instead of /dev/mmcblk0p1.

Note, I did try setting alpine_dev=mmcblk0p2 in cmdline.txt, but on boot
I got an error about /sbin/init being missing and was dropped to an
emergency shell.

Does anyone have any ideas on how to fully utilize all the space on my
SD card? Thanks!

Peter Bui
Received on Wed Feb 04 2015 - 23:06:20 UTC