What is a typical size for a minimal Linux server install?

30,729

Solution 1

Well, if you were to compile from nothing but source code and a cross compiler... the full kernel and API (libraries+headers), glibc, coreutils, gcc/binutils and a few necessary tools, you would typically be left with about a 600MB or so distro. Add to that your distro's choice of package management and default utilities you can see where your disk utilization is coming from. Micro/gutted distributions typically rip out all lib/binary debugging symbols and compile a smaller libc (such as dietlibc). They may also omit a full compile environment which sucks up a significant amount of disk space.

It is possible to compile a fully bootable x86 linux operating system in about 6MB of disk space. Make some further modifications and you can cram it in just a few hundred K of embedded flash. Take a look at tinycore/ucore linux. It is built off of fltk and I believe dietlibc (8MB with X, 6MB without).

Solution 2

That is a typical install size. However if you're looking for something with a very small footprint you could try:

Solution 3

In terms of storage available even on embedded systems, < 1 GB is hardly "big" any more. An AWS EC2 m1.small instance includes 160 GB storage -- that's more than enough for virtually any server instance you could imagine (few current configurations use more than ~10 GB, and I've yet to see one requiring > 20GB for a base installation).

You seem to think rolling a minimal install is some painful process. It really isn't. Do a minimal base installation. Add only the packages you need. It may take a few days for your system to stabilize (in the sense that you're no longer adding packages), but you'll end up with a lean build. That just works.

If you'll look under various system directories, you'll find that a number of things contribute to size. Kernel and modules (build your own statically compiled kernel), internationalization, documentation, and package repos will account for a lot. There are tools (deborphan, localepurge, etc.)

There are builds which are specifically designed for very small form factors, utilizing mudebs and the like. If you have an interest in these, explore on your own.

If you're specifically interested in reducing the size of a Debian installation, you could follow the suggestions of the ReduceDebian wiki page: http://wiki.debian.org/ReduceDebian

Solution 4

If you uncheck the "standard system tools" option during a debian squeeze install, it takes 380MB and installs the following 152 packages

acpi
acpi-support-base
acpid
adduser
apt
apt-utils
aptitude
base-files
base-passwd
bash
bsdmainutils
bsdutils
busybox
console-setup
console-terminus
coreutils
cpio
cron
dash
debconf
debconf-i18n
debian-archive-keyring
debianutils
diffutils
discover
discover-data
dmidecode
dmsetup
dpkg
e2fslibs
e2fsprogs
eject
findutils
gcc-4.4-base
gettext-base
gnupg
gpgv
grep
groff-base
grub-common
grub-pc
gzip
hostname
ifupdown
info
initramfs-tools
initscripts
insserv
install-info
installation-report
iproute
iptables
iputils-ping
isc-dhcp-client
isc-dhcp-common
kbd
keyboard-configuration
klibc-utils
laptop-detect
libacl1
libattr1
libblkid1
libboost-iostreams1.42.0
libbz2-1.0
libc-bin
libc6
libc6-i686
libcomerr2
libcwidget3
libdb4.8
libdevmapper1.02.1
libdiscover2
libept1
libexpat1
libfreetype6
libgcc1
libgdbm3
libklibc
liblocale-gettext-perl
liblzma2
libncurses5
libncursesw5
libnewt0.52
libnfnetlink0
libpam-modules
libpam-runtime
libpam0g
libpci3
libpopt0
libreadline6
libselinux1
libsepol1
libsigc++-2.0-0c2a
libslang2
libsqlite3-0
libss2
libssl0.9.8
libstdc++6
libtext-charwidth-perl
libtext-iconv-perl
libtext-wrapi18n-perl
libudev0
libusb-0.1-4
libuuid-perl
libuuid1
libxapian22
linux-base
linux-image-2.6-686
linux-image-2.6.32-5-686
locales
login
logrotate
lsb-base
man-db
manpages
mawk
module-init-tools
mount
nano
ncurses-base
ncurses-bin
net-tools
netbase
netcat-traditional
os-prober
passwd
pciutils
perl-base
procps
readline-common
rsyslog
sed
sensible-utils
sysv-rc
sysvinit
sysvinit-utils
tar
tasksel
tasksel-data
traceroute
tzdata
ucf
udev
usbutils
util-linux
vim-common
vim-tiny
wget
whiptail
xkb-data
xz-utils
zlib1g

That saves about 150MB of space by skipping the following 110 packages.

apt-listchanges
at
bash-completion
bc
bind9-host
bsd-mailx
ca-certificates
dc
debian-faq
dnsutils
doc-debian
doc-linux-text
exim4
exim4-base
exim4-config
exim4-daemon-light
file
ftp
geoip-database
host
iso-codes
less
libbind9-60
libbsd0
libcap2
libdb4.6
libdb4.7
libdns69
libedit2
libevent-1.4-2
libgc1c2
libgcrypt11
libgeoip1
libgnutls26
libgpg-error0
libgpgme11
libgpm2
libgssapi-krb5-2
libgssglue1
libgssrpc4
libidn11
libisc62
libisccc60
libisccfg62
libk5crypto3
libkadm5clnt-mit7
libkadm5srv-mit7
libkdb5-4
libkeyutils1
libkrb5-3
libkrb5support0
libldap-2.4-2
liblockfile1
liblwres60
libmagic1
libnfsidmap2
libpcre3
libpth20
librpcsecgss3
libsasl2-2
libsasl2-modules
libtasn1-3
libtokyocabinet8
libwrap0
libx11-6
libx11-data
libxau6
libxcb1
libxdmcp6
libxext6
libxml2
libxmuu1
lsb-release
lsof
m4
mime-support
mlocate
mutt
ncurses-term
nfs-common
openssh-blacklist
openssh-blacklist-extra
openssh-client
openssl
patch
perl
perl-modules
portmap
procmail
psmisc
python
python2.6
python2.6-minimal
python-apt
python-apt-common
python-central
python-minimal
python-reportbug
python-support
reportbug
sgml-base
tcpd
telnet
texinfo
time
w3m
wamerican
whois
xauth
xml-core

Solution 5

During installation of Debian you can unselect the "Base System" task and have an extremely minimal system of only around 200MiB. Doing this wont have a lot of the commonly expected packages installed.

Alternatively there is Emdebian, which can be installed in less than 32MiB.

Share:
30,729

Related videos on Youtube

mt3
Author by

mt3

Nothing really.

Updated on September 17, 2022

Comments

  • mt3
    mt3 over 1 year

    Both Debian and Ubuntu end up with 500 Mb to 750 Mb in their "minimal" installations, even after starting with the "netinstall" iso or "business card" iso and no optional packages installed later on in the installation process. The Debian "netinstall" is a 180 Mb download, and the "biz card" iso is 50 Mb.

    My question:
    is this a typical size for a minimal server install?

    In other, more contemporary words:
    MINIMAL, Y U SO BIG?

    Are there any other options/variants (primarily Debian) for keeping things as lean as possible without having to go the route of customizing one's own bare bones Debian install?

    Thnx in advance.

    • user9517
      user9517 about 13 years
      How long is a piece of string - some pretty small installs can be found here
    • mt3
      mt3 about 13 years
      @Iain thnx. Tho I'm a bit more concerned for the security/regular updating aspect since I'm looking primarily for a server install. Plus, Sameer mentioned here that they might not be that minimal either.
    • Snowlockk
      Snowlockk about 13 years
      I am not quite sure why you are so worried about such a small size, Hardrives are well into the TB range now..
    • John Gardeniers
      John Gardeniers about 13 years
      Jacob's comment sums up my thinking on this. When I started reading the question I nearly went for the vote button because it was sounding like you're trying to do something real compact, such as a car PC. I'm still not convinced this is on topic.
    • mt3
      mt3 about 13 years
      @John Gardeniers it's primarily for any VPS that provide VERY small amounts of storage space (2-5Gb) and the whole thing aroused my curiosity, especially since "minimal" installs ended up feeling quite bloated (the 1st time it had presented itself to me). so it's part curiosity, part practicality.
  • mt3
    mt3 about 13 years
    Do those have the same reputation for security that Debian has? Intended for use as a server install? I was also looking at Alpine Linux and BusyBox, as mentioned here.
  • mt3
    mt3 about 13 years
    Ya, it would seem there should be at least 2 variants for many of these distros: "everything plus the kitchen sink" and "just a small pot to squat in". Especially for server environments.
  • sreimer
    sreimer about 13 years
    They are both based off of Debian so they should have similar security features. However, it appears DSL does not include IPtables which Puppy does have packages for.
  • Arrowmaster
    Arrowmaster about 13 years
    Damn Small Linux hasn't had a release since 2008 and reportedly development has halted. It is probably a very poor choice right now.
  • mt3
    mt3 about 13 years
    Thanks for the Embedian. Still unsure whether it is ideal for use as a server OS.
  • mt3
    mt3 about 13 years
    thnx for the details. Appreciated.
  • mt3
    mt3 almost 12 years
    Upvoted for the insightful links and resources. I wasn't implying there was any pain to rolling one's own, just curious why that isn't the default approach to distros intended for webservers and security purposes, i.e. "less is more" and "if you don't need it, don't install it".
  • Dr. Edward Morbius
    Dr. Edward Morbius almost 12 years
    It's pretty much a question of "how small is small enough" and "what's sufficient pain"? I can fit 32 GB on my pinkie nail. If you want to do usable work on a system, some level of available tools are helpful. The minimum size to bootstrap a Debian system without wild heroics is roughly the size of a netinst minimal image (20 - 180 MB). Back in potato days, a base tarball image of roughly 14 MB was available. Just the kernel + modules typically runs larger than that now.