9

Is there any Raspberry Pi Live Boot or Read Only Distros available? I was wondering, since the EE stack exchange normally gets some questions regarding safe power disconnect on the RPi, if such a distro existed. There are many Linux distros that come on Live Boot Cds or flash drives, which unpack from the cd and run completely from memory (One I'm personally familiar with was DamnSmallLinux, another being BackTrack). Most embedded systems in consumer products are also run almost entirely on ram disks, to the point they go entire boot cycles without writing a single thing to flash.

The main goals being
1) to prevent file corruption on the SD card if power is lost unexpectedly, without having to rely on UPS or Battery solutions.
2) running programs from boot to shutdown (or power loss) that need no writing to the sd card.

So is there any such Targeted to the RPI distro, or any groups planning to make one?

asked Apr 18, 2013 at 19:03
3
  • What happens when you use the protect switch on the SD card? Commented Apr 18, 2013 at 20:58
  • 3
    @gnibbler As far as I know, the write protect pin isn't used in the RPI. Pin 13 of the sd card socket is left unconnected. And simply running a standard distro in read only mode isn't that simple even if it were connected. Commented Apr 18, 2013 at 21:12
  • The Raspbian can do this out of the box: learn.adafruit.com/… Commented Apr 27, 2022 at 0:56

5 Answers 5

7

Yes there is; my project Nard SDK
http://www.arbetsmyra.dyndns.org/nard/
does exactly what you want. It's a minimal OS which runs entirely from RAM. After bootup one can even remove the SD card and it will continue run just fine. During system upgrade it has preventive actions against power cut in the middle of the upgrade.

N ot A nother R aspberry D istribution is a GNU/Linux based software development kit (SDK) written from scratch for the Raspberry Pi family of boards.

cde
3011 gold badge3 silver badges12 bronze badges
answered Jul 2, 2014 at 11:22
1
  • This looks like a good start. Commented Jul 3, 2014 at 0:28
2

You can use TinyCoreLinux shown here . It runs entirely from RAM, but can store settings/files/apps on demand. At the moment of writing this one was the latest with just command line and SSH, having a little more then 18MB zipped. Versions having X in it's name are with GUI. And yes, there are QEMU (virtual machine) images to try too. There are many packages ready to be installed, and you can also make your own or install from source.

answered Jul 3, 2014 at 10:50
1

One solution (untested) would be to use Raspbian, but instead of directly mounting the filesystem from the sd card as / (root), you would mount it in some folder, say /readonly, with -ro option (mount -o ro /dev/mysdcardpartition /readonly), create a directory /readwrite, then mount a unionfs as / using /readonly for the readonly part and /readwrite for the read-write part.

Note all this needs to be done very early during the boot, and you'd better have a reasonable understanding of the linux boot process before you attempt that.

This is basically what most livecds do, except that they mount from a squashfs or similar image of the disk instead of using a real partition.

You can probably find some information on the internet on how to make a livecd from an existing debian installation, and if you need help doing the steps I described above, you'll get more answers by asking on stackoverflow or superuser as these steps aren't specific to the Raspberry Pi.

Edit: It seems the linux kernel for the Pi (at least raspbian's kernel) expets the SD card to be always there, so you may have a few problems if you try to remove the sd card after boot, see this post on http://www.raspberrypi.org (I haven't read the whole thread, so I don't know if there's a solution).

answered Sep 13, 2013 at 12:19
0

One image that fits your description is Industrial Perennial Environment. It doesn't run completely from memory, but does mount the SD card read-only and provides a few tools to work with the read-only file system. There are actually two branches: a version based on buildroot with a focus on pre-built embedded systems without much flexibility and a version that's just a (stripped down) Raspbian flavor and thus can be used like most Pi's if you install additional packages and learn to work around the read-only property. The Raspbian version is officially deprecated, but it was recently updated anyway.

answered Jul 3, 2014 at 12:19
0

Puppy linux for raspberry pi. Testing it now. Called rasppuppy, runs in RAM, and at your discretion may save sections on sdcard.

answered Feb 2, 2020 at 23:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.