5

I have an industrial computer (read: no keyboard/mouse/monitor except during maintenance) which will control some machinery. The operating system will be Linux (I would prefer OpenSuSE, but it's not a strict requirement). The software doesn't need to store anything between successive launches.

I want the end user to be able to just power off the computer at any time he wants, without sending a shutdown -h now command or the like, and then waiting for the computer to shut down. To achieve that, I want to use union mount, probably aufs, so that the SSD with root filesystem is accessed only for reading and is NEVER, EVER written to.

The Live USB stick article on OpenSuSE wiki says to just dd the *.iso with the OS on the flash drive. I guess that will work with SSD, too. But I don't want the SSD to have the ISO 9660 filesystem. Can I just install OpenSuSE properly on say ext2/3/4 or XFS or whatever and then lock the SSD from writing, redirecting all write requests to a RAM disc through aufs?

Could you please give me a hint on how to implement this?

1 Answer 1

0

You need to make changes to the initrd image used at boot time to make this happen.

Have a look at How To: Build A Read-Only Linux System which explains how to do it for Ubuntu systems. No doubt the initramfs infrastructure on Suse will be slightly different but it shouldn't be hard to adapt.

Alternatively look at how the live distribution is doing it, extract the relevant bits and add them to your current initrd. The initrd is a cpio archive, extract it with cpio and look at the init script, this is where all the magic happens.

I'm more familiar with how knoppix does it, but you'll probably find suse does something very similar:

  • mount root filesystem read-only
  • mount tmpfs for read-write branch
  • layer them on top of each other with aufs
  • use pivot_root to change root filesystem.
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .