[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

HOWTO example for ReadOnly Rootfs using multistrap

Hello mailinglist,

I tried several embedded linux systems for my target device (seagate dockstar - 128MiB/kirkwood/4USBports) and finally came back to Debian/Emdebian.

Since I like to install the system onto the internal NAND flash,
my main requirement was to use a READ ONLY root file system -
or at least one without write access besides configuration issues.

The obviously volatile result was made public here:

The information is placed here, if anyone digging through the mailinglist archive would look for an example for
a) using multistrap
b) read only rootfs

The solution is not perfect but works for me. Makefiles would be
a better way than bash skripts, but at the beginning I wasn't aware
of the recipe/make character.

The skript set produces a ubi-image, ext2 image and tar.gz of the
generated rootfs. The way how this is created is ugly and
not very generic:
- no (marginal) sanity checks
- defining packages in conf file
- running multistrap
- tweak configuration (e.g. nameserver and iface)
- tweaking some packages for read only usage (e.g. fsck.ubifs, samba)
- preparing an aufs-overlay over /var-branch to come over most
  write ambitions of the majority of the packages.
  RO-base + RW-memory overlay
- squashing /var-ro branch to save some inodes on ubifs
- generate images

The final rootfs includes samba, transmission, autofs and
mediatomb besides the common packages needed for a proper
debian system (ping and wget are served via busybox for example).
The resulting size is about 100MiB and fits well in the
219MiB parition on the 256MiB NAND. After installation
I have a 50% usage on the rootfs.

I have found some bugs which could be filed against the BTS
(excerpt of TODO:
- fsck.ubifs dummy package similar to fsck.nfs (fsck.ubifs is not implemented) - noauth must be true even if Emdebian archive keyring installed on host system - mksquashfs 4.0 from Squeeze did not work for me on my arm target, 4.1 from Sid does)

I don't know, if you appreciate information like this mail,
so please don't bite me. Since I heavily used multistrap and
Emdebian, I thought it would be worth to share the result with others.


Reply to: