Read Only Debian Squeeze on internal NAND

Talk about the project itself, the community, where we are and what we need. Great place to introduce yourself and make friends as well.

Read Only Debian Squeeze on internal NAND

Postby ossy » Sun Jan 30, 2011 12:05 pm

Hi, I tried several embedded linux systems for my target device (seagate dockstar) and finally went back to Debian/Emdebian. The size of Arch Linux ARM install linux was too large for the 256MiB NAND of the dockstar and it was a bit hard to make it work as readonly system (sorry guys, but I admint your work anyway!, I still have a USB stick with Arch Linux ARM install linux which is updated from time to time ;-) ).

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:
http://gitorious.org/dockstar/emdebian-multistrap

If anyone looks for an example for:
a) create the rootfs apart from the target hardware
b) read only rootfs
c) using multistrap of Emdebian to create a Debian compatible rootfs
might have a look at this.

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. But most of the settings could be set via configuration variables.

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.

Gimmick: /var is overlayed via aufs: RO-base (squashfsimage) + RW in-memory -> solves most write ambitions of many packages. If you really need a configuration change under /var/* you can resquash the sqfs-image.

Currently I am working on automounting my storage disk and show its mount state via the dockstar leds. If the led indicates "nothing is mounted" it is safe to power down the dockstar without ssh in and shutdown (rootfs is readonly). Note: Loading the kernel and initramfs from nand is faster that loading from usbstick.

If you prefere a full featured system, do NOT use NAND. Just take a USB stick and put Arch Linux ARM install linux (or full debian) on it and live with the disadvantages like "ssh in and shutdown manually".

regards
ossy
ossy
 
Posts: 1
Joined: Sun Jan 30, 2011 11:48 am

Return to Community

Who is online

Users browsing this forum: No registered users and 1 guest