LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-23-2009, 12:37 AM   #1
coffeecoffee
Member
 
Registered: Feb 2009
Posts: 58

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


Hi,

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.

Thanks
Michael
 
Old 02-23-2009, 01:12 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,828

Rep: Reputation: 256Reputation: 256Reputation: 256
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 01:13 AM.
 
Old 02-23-2009, 01:31 AM   #3
lazlow
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, 08:04 AM   #4
coffeecoffee
Member
 
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!!
 
  


Reply


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 05:28 AM
RAM: Does linux require as much ram as Windows XP? hanzj Linux - Newbie 48 04-18-2007 01:14 AM
Does the X Window System server in DSL 1.1 require 128MB RAM? t3gah DamnSmallLinux 6 06-30-2005 12:14 AM
SIZE of "initrd" in accordance with system RAM in an embedded linux ( a busybox) ... rs_javadi Linux From Scratch 0 08-23-2004 02:01 AM


All times are GMT -5. The time now is 04:19 PM.

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