Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am looking for a Linux build that takes up very little memory to boot up. I don't need any of the UI modules.

I need help on choosing from the ones currently available or pointers on building my own. I looked at some Linux distros like Arch Linux and Damn Small Linux, but I haven't decided yet. And also it would be great if someone could help me on how to run a custom program immediately on bootup.

Thanks for the help, in advance.

share|improve this question
    
This would probably have been better on unix.stackexchange.com or superuser.com as it isn't really a programming problem at all. The answer to the second half of your question (running a program at boot) is "Look into the init process." (possibly a script under /etc/init.d is all it takes, but that depends on your timing requirements). –  dmckee Feb 12 '11 at 17:45
1  
See Which minimal but extendable Linux distribution to choose, Distro- lightweight and easy to install, and other questions under /distribution-choice. You may get more specific recommendations if you say what you're going to use the system for (networking? home/industrial automation? monitoring? …). –  Gilles Feb 12 '11 at 22:13
add comment

migrated from stackoverflow.com Feb 12 '11 at 21:56

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 3 down vote accepted

Try TinyCore (or MicroCore even).

TinyCore is at 10MB (ISO) and MicroCore at 6MB. TinyCore has X and a minimal GUI, while MicroCore is text mode only. I use it on a 12 year old laptop with 199MHz and 32MB RAM. Works perfect, even with WLAN, etc.

TinyCore is made with customization abilities in mind. You can easily fork your own minimal dristro from TinyCore. To facilitate this, there's even a remastering how-to in the Wiki.

share|improve this answer
    
Oh this I have not heard of. Will check it out. Thanks! –  ryan Feb 14 '11 at 14:22
add comment

It is generally possible to roll a system with Busybox; busybox's web site details how to do this.

A statically linked busybox binary will require just a couple of megs of memory (over what the kernel requires, of course). I've been able to boot and log into a machine with 8M of ram.

However, it is relatively complicated to get all the system services you may require working, using a small existing distribution might be better.

How much is "little memory"? Are you on a really tiny embedded system? Unless you have less than 64M, or your process needs to use a lot of the available ram (and no swap), I'd recommend going with a minimal standard distro.


Edit: The "buildroot" tool is a companion of Busybox which helps you to build very small usable filesystems.

share|improve this answer
    
Little memory is as low as possible. I'm not looking at any bound. Thanks for the info! –  ryan Feb 14 '11 at 14:21
    
Last time I checked, it was not generally possible to buy a machine (including SoC etc) with less than 32 Mb of memory. –  MarkR Feb 14 '11 at 16:09
add comment

You could go with Arch linux, but that doesn't strictly meet your "custom" distro, I think.

I'd go with Linux From Scratch. That's not really a distro, but rather a system for building your own distro. I think you'll find you have some "fat" in your system when you're done, as it has you building and installing Tcl/Tk (or at least it used to) and a few other things that aren't strictly necessary, but let you run test cases semi-automatically.

share|improve this answer
    
Yep, I've heard of LFS. But it definitely is more work than using arch. I will give it a shot. thanks! –  ryan Feb 14 '11 at 14:22
add comment

I recommend trying out http://buildroot.net/, and us it to build a custom linux system that suits your needs exactly, you can build tiny system with this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.