Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-22-2009, 11:37 PM   #1
Registered: Feb 2009
Posts: 58

Rep: Reputation: 16
Linux in RAM only to not require shutdown (embedded system)?


I am migrating a custom system (with no operating system per se) to run under Linux (it's actually a PC/104 architecture but it's basically a stripped down PC). It is a standard control application. The first question that struck me was, how can I protect against the user switching off the power supply without correctly shutting down? Ideally, since this is an embedded system with Linux running in the background only, there should be no concept of 'shutting down' to the user. They should be allowed to just switch it off and not worry about the filesystem (there is no filesystem use apart from loading the code). Is there any way I can get linux to read from disk initially (to load the applications) but then operate solely in RAM and never write to disk? Then the user would be able to switch off the unit without shutting down..

Looking forward to any replies.

Old 02-23-2009, 12:12 AM   #2
Senior Member
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,013

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
You can use a read-only file system. With an embedded system, you don't have that much to deal with. You can strip the kernel down to almost bare, and compile everything you need into the kernel itself; vs a modular kernel. Once you get it to boot, it will always boot, no matter how many times power is cut.

I'll tell you a little trick. I don't know how much disk you need, but linux will USB boot off up to a 4 GB flash drive. If you know what you're doing, you can go up to an 8 GB flash drive. That way you can configure the drive on a fully functional linux system, with every tool you could ever possibly want, and then plug it in the embedded device, and watch it go. It's cool.

There are embedded distros, that are made to just put on a flash drive, as read only. Read-only is a file system flag. You can set it with 'parted'.

Last edited by AwesomeMachine; 02-23-2009 at 12:13 AM.
Old 02-23-2009, 12:31 AM   #3
Senior Member
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
If you look at some of the live cds (like Fedora) they have the option to run entirely from ram. You would have to reconfigure it a little bit (basically no options) but the basics setup is there.
Old 02-23-2009, 07:04 AM   #4
Registered: Feb 2009
Posts: 58

Original Poster
Rep: Reputation: 16
Awesomemachine & lazlow: you have really answered my question and helped me out a great deal. thank you!!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xpert in 8-16 bit microcontroller embedded system now inclining toward embedded linux priyadarshan Linux - Embedded & Single-board computer 2 02-12-2009 04:28 AM
RAM: Does linux require as much ram as Windows XP? hanzj Linux - Newbie 48 04-18-2007 12:14 AM
Does the X Window System server in DSL 1.1 require 128MB RAM? t3gah DamnSmallLinux 6 06-29-2005 11:14 PM
SIZE of "initrd" in accordance with system RAM in an embedded linux ( a busybox) ... rs_javadi Linux From Scratch 0 08-23-2004 01:01 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration