Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently trying to setup an embedded computer in order to load its filesystem into RAM, to avoid writing anything on the real disk but to run applications normally though. Everything should run into RAM, the system should be able to be powered off at any moment, without any repercussion. I have been told to use ramfs to achieve this.

The OS is Linux debian 2.6.32-5-486 i586.

I know nothing about this subject, but I have tried the following:

I had this original /etc/fstab file content:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=6ef[....]7f3 / ext2 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=7ab[....]bd4 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Which I modified like this (the (changed) markers are not present in the real file):

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
#UUID=6ef[....]7f3 / ext2 errors=remount-ro 0 1                (changed)
ramfs / ramfs defaults 0 1                                     (changed)
# swap was on /dev/sda5 during installation
#UUID=7ab[....]bd4 none swap sw 0 0                            (changed)
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

But this doesn't seem to work. When I do a "df -a" command, I approximately get this:

File system    Use%    Mounted on
ramfs          17%     /
tmpfs          0%      /lib/init/rw
proc           -       /proc
sysfs          -       /sys
udev           1%      /dev
tmpfs          0%      /dev/shm
devpts         -       /dev/pts

But I don't even know if this output is good or not, considering my concerns here. All I can remark, is that, when I create a file in this configuration, it persists after rebooting. And I don't wish this behavior.

Can you please illuminate me a bit about the things I forgot and misunderstood?

share|improve this question
Have you checked this procedure?… – Jakke Jul 1 '14 at 10:00
If you just want to avoid writing, you can simply mount the root filesystem read-only and use AUFS. – Daniel B Jul 1 '14 at 10:00
@Jakke: Im going to check this link, but I hope this works for debian ~2.6 too, because it is mentioned "Debian 4.0"... – user3535021 Jul 1 '14 at 11:46
@Daniel B: I tried earlier to set the rootFS in read-only mode and I got issues which I don't remember. But I didn't tried with AUFS, i'll test this too. – user3535021 Jul 1 '14 at 11:47
Of course, you need some directories to be writable. Fortunately, there‚Äôs a guide of sorts for this. – Daniel B Jul 1 '14 at 11:50

You must log in to answer this question.

Browse other questions tagged .