3

I'm interested in knowing the smallest, most minimal Unix/Linux distro available, for installation onto my weak laptop to use as a dedicated LAN server.

Some pros would be 64-bit support and/or apt/apt-get, and CLI-only support.

Clarification: 'Smallest' is in terms of used disk space once fully installed.

countermode
  • 7,533
  • 5
  • 31
  • 58
Dev
  • 157
  • 2
    Debian minimal: just install what you need... – jasonwryan Sep 12 '16 at 06:25
  • Where exactly would I download it? – Dev Sep 12 '16 at 06:27
  • tomsrtbt fits on a floppy – captcha Sep 12 '16 at 06:27
  • 1
    Where would you think to look to download a debian image? – jasonwryan Sep 12 '16 at 06:28
  • all I can find is netinst, which is not minimal as far as I can see – Dev Sep 12 '16 at 06:29
  • 1
    define 'smallest' – captcha Sep 12 '16 at 06:31
  • smallest in used disk space once fully installed – Dev Sep 12 '16 at 06:31
  • Do you really need the smallest, or would "small enough" do? You mention 64-bit support, so the machine isn't likely to be many decades old, and might have sufficient space for at least an almost-normal installation. Even if not, the best (easiest) solution likely depends on what utilities you want to run and how much space you have. – ilkkachu Sep 12 '16 at 06:49
  • I would prefer a very small installation that supports 64-bit processing and has apt-get. I need it to run fast on extremely slow computers. – Dev Sep 12 '16 at 06:53
  • I will most likely be using it to host small to medium scripts using various asynchronous libraries, and I need the most minimal OS possible to allocate as much CPU and memory to the running processes as possible, since the computer does NOT have much to offer. @drewbenn – Dev Sep 12 '16 at 07:05
  • 1
    @Dev, I think you're mixing up storage space used (software installed by default) with memory used (running processes), and still not telling what your actual limitations and requirements are... – ilkkachu Sep 12 '16 at 08:07
  • My laptop can barely run ubuntu with mediocre speed. It still lags a lot, so now I want to run a very fast and small operating system on it instead. – Dev Sep 12 '16 at 14:52
  • https://unix.stackexchange.com/questions/2692/what-is-the-smallest-possible-linux-implementation – Ciro Santilli OurBigBook.com Apr 17 '17 at 14:23

2 Answers2

3

Look for Alpine Linux. It is more secure linux distributive because:

The kernel is patched with an unofficial port of grsecurity/PaX, and all userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection. 

You can get it from https://alpinelinux.org .

Khirgiy Mikhail
  • 332
  • 1
  • 5
  • Security is not my concern here, and as shown by the 83+MB size, this is clearly not what I was looking for. Sorry. – Dev Sep 12 '16 at 06:50
  • However, I will consider it. – Dev Sep 12 '16 at 06:52
  • 2
    I don't understand clearly what are you looking for. But i decided that you can find it in list of linux/UNIX for embedded platforms https://en.m.wikipedia.org/wiki/List_of_operating_systems#Embedded and look for NetBSD https://wiki.netbsd.org/guide/exinst/ – Khirgiy Mikhail Sep 12 '16 at 16:38
  • The OP seemed a bit hostile for no reason I could discern (or, at any rate, he had unrealistic ideas of how much time an answerer would have to help him), but he's a first-time questioner and may never come back, so who knows? His situation is interesting, though. Other than embedded developers, who actually still has a computer system that cannot support an 83-MB installation? Such a system would have to be well over 20 years old, would it not? My answer spoke of Debian, but I do not believe that any of Debian's linux kernels -- even if recompiled -- still supports i386 processors that old. – thb Sep 14 '16 at 10:49
3

As @jasonwryan has observed, Debian GNU/Linux is engineered to do what you wish. In a comment, you have mentioned Debian's netinst image with dismay, but actually, that is just the image you seek. The image itself (though fairly small) is not minimal, but you are not going to install everything in the image onto your machine. You are going to install only a minimal part of it.

Debian organizes software in packages. Each package has a Priority, which is any of

  • required
  • important
  • standard
  • optional
  • extra

The last two, optional and extra, comprise over 99 percent of the packages Debian distributes. You aren't going to install any of those, so let's talk about the other three priorities.

Packages with priority required are, well, required. If your machine does not have them, then Debian won't work. You must install all these.

Packages with priority important are needed that your system be usable in any normal way. You need not install these in theory, but I believe that you will install them all. They aren't many. The principal distinction between required and important is that the required packages afford your system enough functionality to be able to install (and/or uninstall) other packages including important packages. The required suite alone really is not enough to do anything interesting with your system (but if you want to try a required-only system as an experiment nevertheless, feel free).

Packages with priority standard are not needed but they are not many and are, well, standard. The usual thing to do would be to install the standard packages because even lightweight systems normally carry these, but this is up to you. I gather that you would prefer to omit the standard. This is fine.

There are several ways to install only required and important packages. To list them all here would be too much. However, this ought to get you started.

KERNELS

The above ignores one point: the kernel. The kernel packaged by Debian is not minimal. You can strip it down, recompile it, and make it much smaller, but this takes some work and some trial and error. Use the make-kpkg package for this. Be prepared to do a lot of reading before you can make this work, but it's pretty fun one you get the hang of it.

Most users aren't going to recompile their kernels, though, so, during installation, watch for a dialog re kernel drivers to appear on your screen. You may have to set your debconf priority at the start of installation to medium, as I do, or lower; check this yourself. Look for the action "change debconf priority" on the main (not the initial) installer menu.

Once you have the debconf priority set to medium or lower, during the "install the base system" step, a dialog will eventually appear on your screen asking if you want all drivers or only targeted ones. Choose "targeted."

MORE ABOUT THE INSTALLER

A StackExchange answer like this is going to be limited in length. It will not be a full manual. However, if unsure what to do with the installer, do the following.

  1. Boot your machine from the netinst image to start the installer.
  2. At the front-page menu, select advanced options then expert install (The level of expertise here required is moderate, but you are trying to do something nonstandard, so expert install is what you want.)
  3. Wait for the installer to boot.
  4. Before selecting any other option from the main installer menu, scroll down to set debconf priority.
  5. Choose priority medium.
  6. After choosing the priority, then, each time the installer returns you to its main menu, do not scroll up or down, but just accept the default the installer highlights in each instance. The installer will walk you through the installation steps in this way (but see also point 7, next). If unsure what I am talking about, run the installer per the above steps: you'll soon see what I mean.
  7. You can optionally skip over the installer stages detect network hardware and configure the network (and even configure the clock, if you don't mind using UTC time). How to skip? Answer: when the installer highlights a step you wish to skip like detect network hardware, press the DOWN key to skip it. Most of steps the installer highlights are necessary, however; there are only a few you can reasonably skip.
  8. Note: skipping detect network hardware does not prevent your network interface from working after installation. It just means that you won't be networked during installation.
  9. For questions, consult Debian's installation manual here.

There is a certain amount of this you are just going to have to figure out for yourself. Though no harder than it needs to be, Debian is not really a beginner's system. Beginners can instead learn on a Debian derivative like Mint or Ubuntu—though I do not believe that you should try that using the minimal machine you have described.

Good luck.

thb
  • 1,135
  • Unfortunately I do not understand the link you gave me. Is there a tutorial or similar? – Dev Sep 12 '16 at 07:20
  • A tutorial to aptitude(8)? Not that I know. However, you can get Aptitude's manual by installing aptitude-doc-en (or aptitude-doc-??, where the ?? is your preferred language) and then pointing your web browser at the local, offline URL file:///usr/share/doc/aptitude/html/en/index.html – thb Sep 12 '16 at 07:29
  • Now that I look at it, Aptitude's manual includes a tutorial, so there you go. The manual is not unlikely online somewhere, too, but since I assume that you know how to work a web search engine, I'll leave that to you to investigate. – thb Sep 12 '16 at 07:32
  • I don't know how to use aptitude, when to use it, etc. I have no idea what to do, I'm completely lost. – Dev Sep 12 '16 at 07:35
  • 'Install base system' doesn't give me any choice at all during the installer. – Dev Sep 12 '16 at 07:35
  • The answer has been updated to treat your latest comments. The answer is now long enough, so I am going to leave it there. Good luck. – thb Sep 12 '16 at 07:56
  • @Dev: My time is limited. I have other things to do. Upvote the answer if you find it useful. In any case, good luck. – thb Sep 12 '16 at 08:00
  • @thb what size (disk space) is a minimal debian install? – Centimane Sep 12 '16 at 10:52
  • @Centimane: Good question. I do not know. If you try it and find out, let us know. Obliquely, if I unzip my pbuilder(8) base.tgz to get base.tar, the base.tar is 363 MiB. If you do not know what pbuilder(8) is, I would not ask you to go look it up; but, at any rate, on this basis, 363 MiB for a minimal Debian install would be my guess. I do not believe my guess, though. – thb Sep 12 '16 at 13:05
  • @thb On RHEL 7 I did a yum -y -q groupisntall base --installroot=/test ; du -hcs /test and it listed 876M. I know it's not Debian, but RHEL is a branch of Deb, so it might be close. 876M is larger than I would have thought, I certainly wouldn't consider it tiny. – Centimane Sep 12 '16 at 13:36