LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Which distro is very small with networking, no desktop, command line only (https://www.linuxquestions.org/questions/linux-distributions-5/which-distro-is-very-small-with-networking-no-desktop-command-line-only-4175613668/)

challengersky 09-12-2017 09:23 AM

Which distro is very small with networking, no desktop, command line only
 
Hi,

I'm looking for a very small footprint Linux distro with networking, no desktops, no audio and just a command line interface.

I know there are server versions, but even they have a lot of extra bulk.

I'm putting it on a small embedded system controller. All I need is networking, serial ports, VGA with just a command line interface.

frieza 09-12-2017 09:48 AM

uClinux comes to mind, it's a Linux distribution designed for embedded systems.
https://en.wikipedia.org/wiki/%CE%9CClinux

challengersky 09-12-2017 05:18 PM

Frieza, thanks much. However uClinux doesn't appear to support x86 which is what I currently need. I will keep it in mind though for the smaller future designs which will use other archs.

ferrari 09-12-2017 06:29 PM

Maybe archlinux could meet your needs with a minimal install?

frankbell 09-12-2017 08:13 PM

A minimal install of Slackware, without installing any of the GUI components, might be an option.

This page outlines what software is in which software set. (It appears to be in need of updating, as Gnome has not been included in Slackware for years, but it's a starting point. The Slackware install is nicely annotated as to what software in each software set.)

!!! 09-13-2017 02:05 AM

Do you need anything more than busybox? Http://DistroWatch.com/mll IF not. :cool:

syg00 09-13-2017 02:28 AM

Depends on the OP's definition of "minimal". On all my small systems (pi3, so ARM) I have to have ssh and rsync - some might consider them part of a minimal "network" install. Maybe even me ... :p

I use Arch in such situations - x86 and ARM - but any decent system should do; Debian, Slack, ...

IsaacKuo 09-13-2017 10:26 AM

How small do you need? What's the RAM, and what's the storage?

If I were feeling particularly adventurous, I'd try cramming everything into a customized initrd/vmlinuz of Debian (since Debian is what I'm most familiar with). Strip things down, and it'll fit under 32MB of storage. This will provide a very minimal command line interface, and some sort of networking capability (for example, this is required for PXE boot off an nfs root).

But to what end?

challengersky 09-13-2017 10:51 AM

Hi IsaacKuo,

My current test system is a Diamond Systems Helix SBC. It has a dual core intel x86 processor (non-PAE) with 1GB of RAM. My mSATA drive is 4GB. I'm currently running Xubuntu 12.04.

My next iteration will be with the same processor with 1GB of RAM, but I will only have 256MB of disc space. I'm going to need 192MB for data/log files.

I'm currently in the process of building LFS 8.1. (Learning for me, and to see how it will work).

I like your suggestion of stripping down a Debian version. What I'm not familiar with is how to properly strip a packaged distro without breaking it. I've tried a couple and end up breaking it because somewhere along the line I end up loosing a dependency package or two. To answer your question about size, anything under 64MB would be great.

I used to build custom systems from scratch using Monta-Vista Linux, but it was through all their tools. The only truly hands on playing I got was building custom kernels. I got good at making specialized custom kernels, but it's been 8 years since I've even done that. But I'll be customizing the kernel of small system I get build for this project.

I've rambled for too long. Thanks for any suggestions or help.

Timothy Miller 09-13-2017 11:01 AM

Slackware, Debian, Mageia, and many more all have options for a minimal install.

Arch linux is deprecating 32-bit, so that probably wouldn't be the best choice.

IsaacKuo 09-13-2017 11:56 AM

Oh, I'm not talking about a stripped down Debian. Less than 64MB? No way! But if you can cram everything into the initrd/vmlinuz, then THAT can be very minimal indeed. We're talking the extremely minimal initrd environment, mind you.

Normally, the initrd is used simply to get the main partitions mounted and then chroot'ing into it to continue with most of the boot process.

But if you are mindful of the extremely limited capabilities and *nix software available within the initrd environment, you can theoretically produce a working system purely inside it. In other words, it never mounts any other partitions and it never hands over things to any true Debian install.

Since it seems you're talking about some sort of embedded data collection device, rather than something requiring interactive use, the most suitable thing could be to hack your custom code into /usr/share/initramfs-tools/scripts/local. Basically, find the bit of code where ${ROOT} is mounted, and place your desired commands just below this.

My basic idea is that you will use ${ROOT} to store your data, but it will not actually have any Debian OS files on it. Instead, it will be empty except for /boot and another directory to store the data.

I'm not entirely sure where to put custom executables that you want to include inside the initrd image.

You can get some idea about how to hack code into the initrd and build it in my blog entries on RAMBOOT and NFS-RAMBOOT. These don't do precisely what you want, but it may give you an idea where to start.

So my basic strategy would be:

1) Do a prototype install on the 4GB prototype. Create just one big ext4 partition. Create a utility directory /store for the data. Figure out how to get things working within the customized initrd. In my blog how-tos, the customized initrd will have a GRUB submenu entry called "... .ramboot"; you have to go to the submenu and select the normal looking kernel name to get to the normal Debian install. (You'll need to boot into the normal install A LOT to get things working.)

2) Clone from the 4GB prototype to a 4+GB USB thumbdrive using "dd". Ideally from a liveUSB, so the OS partition isn't mounted at the time (albeit this can work). The command will be something like:

Code:

dd if=/dev/sda of=/dev/sdc bs=32256
You'll need to use "fdisk -l" to confirm the input and output devices.

3) Mount the clone and delete everything except for /boot and /store. Also delete the normal initrd/vmlinuz from /boot (you only want the customized ones). This should get everything down to around 35MB plus the size of your customized software.

4) Unmount; use gparted to shrink the partition to below 256MB

5) clone from the USB thumbdrive to the 256MB unit.

This is all going to be ... experimental. But getting something functional in under 64MB is a challenge.

Oh, you can minimize the size of initrd by removing modules you don't need. I'm not sure how much space that could save, but it could be quite a lot.

fatmac 09-15-2017 01:43 PM

Simple, check out TinyCore - http://www.tinycorelinux.net/

challengersky 09-15-2017 03:19 PM

Hi Fatmac,

I just found that the other day searching around. I really like it and I think it will do everything I want.

Thanks!


All times are GMT -5. The time now is 06:23 AM.