You are not logged in.

#1 2010-04-29 21:26:23

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Minimal Arch Linux Install

I am wanting to create a very minimal arch linux installation. What would be the best way to do so? I installed just the base system and it is about 630 MB. I was thinking of trimming this down to 200mb or less if possible.

Any ideas? Thanks.

Offline

#2 2010-04-29 21:36:23

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 239
Website

Re: Minimal Arch Linux Install

The first thing that comes to my mind is removeing the man-pages, if you don't need them. At the computer im currently using, this would free about 60mb. Another thing is removing packages which are in the base group, but you don't need.

You can also clear your pacman cache with pacman -Scc. This will remove all the pkg.tar.(gz/xz) from /var/cache/pacman/pkg. But notice that you don't have any old versions of the installed packges to fallback if an update destroys something.

edit: Another possibility is to compile a custom kernel with only the modules compiled, which you really need for your hardware. But don't expect wonders from this.

and to add a small disclaimer: only do these things, if you know, what you're doing wink

Last edited by knopwob (2010-04-29 22:04:42)

Offline

#3 2010-04-29 22:03:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Minimal Arch Linux Install

http://mdocml.bsd.lv/
Use this + man-pages, 'pacman -Rs groff man-db'

If you don't need Xorg and base-devel you can save a lot of space, probably you can remove perl.

Offline

#4 2010-04-29 22:03:23

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: Minimal Arch Linux Install

there are alot of base packages that you don't necessarily need if you're trying to do a minimal install.  I would figure out which ones you need and remove everything else.  That being said, I can't see you getting down to less than 200mb.

Offline

#5 2010-04-29 22:06:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Minimal Arch Linux Install

@evr
Sounds like a dare tongue

LotR "remake":
- You have my saw!
- And my hammer!
- And my blowtorch!


Let's see ...

Offline

#6 2010-04-29 22:29:44

esters
Member
Registered: 2006-11-04
Posts: 173

Re: Minimal Arch Linux Install

Whoops that's what happen when you do not read the first post

* Recompiling the kernel (it would be more performance-wise thing to do)
* Replacing gnu coreutils with busybox
* Replacing glibc with some minimal libc implementation (dietlibc, uclibc)

Last edited by esters (2010-04-29 22:33:38)

Offline

#7 2010-04-29 23:16:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Minimal Arch Linux Install

About a year ago I've tried to do the same - now I know how a person with an eating disorder feels ;-) Your OS weights 400MB but you're overcome with the need to purge!
I think at some point you will have to ditch the filedb and locales.
Wait a minute: I know one similar distro that is like Arch w/o pacman and locales and docs - http://crux.nu/ !

Edit: Or http://sourceforge.net/projects/crosslinux/

Last edited by karol (2010-04-29 23:19:55)

Offline

#8 2010-04-29 23:31:42

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: Minimal Arch Linux Install

karol wrote:

@evr
Sounds like a dare tongue

haha, that wasn't meant as discouragement smile
i'll be quite impressed if he pulls it off.

@gamewolf: if i may ask, what's this minimal install gonna be used for?

Offline

#9 2010-04-29 23:58:40

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: Minimal Arch Linux Install

I have a minimal arch chroot setup. At the moment it is about 500MB (when wine data is omitted), but I have base-devel installed for cross compiling. So you could save ~100MB.

Offline

#10 2010-04-30 00:05:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Minimal Arch Linux Install

bobdob wrote:

I have a minimal arch chroot setup. At the moment it is about 500MB (when wine data is omitted), but I have base-devel installed for cross compiling. So you could save ~100MB.

And then you remove teh biiiggest packages: kernel26 etc. and you save another 200MB.

Offline

#11 2010-04-30 00:17:39

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: Minimal Arch Linux Install

kernel26 is already gone. I could get rid of more things, but the more you remove the less use it has.

This is what I have:

acl
ati-dri
attr
autoconf
automake
bash
binutils
bison
bzip2
cloog-ppl
coreutils
cracklib
damageproto
db
device-mapper
dialog
diffutils
dri2proto
e2fsprogs
ed
expat
fakeroot
file
filesystem
findutils
fixesproto
flex
fontconfig
freetype2
gawk
gcc
gcc-libs
gdbm
gettext
glib2
glibc
gmp
grep
groff
gzip
initscripts
iputils
kbd
kbproto
less
libarchive
libcap
libdrm
libelf
libfetch
libgcrypt
libgl
libgpg-error
libice
libmpc
libpciaccess
libsm
libtool
libusb
libx11
libxau
libxcb
libxcursor
libxdamage
libxdmcp
libxext
libxfixes
libxrandr
libxrender
libxt
libxxf86dga
libxxf86vm
licenses
linux-api-headers
m4
make
man-db
mesa
module-init-tools
mpfr
nano
ncurses
net-tools
openssl
pacman
pacman-mirrorlist
pam
patch
pciutils
pcre
perl
pixman
pkgconfig
popt
ppl
procinfo
procps
psmisc
randrproto
readline
renderproto
sed
shadow
sudo
sysfsutils
sysvinit
tar
tcp_wrappers
texinfo
tzdata
udev
usbutils
util-linux-ng
vi
wget
which
wine
xcb-proto
xextproto
xf86-video-ati
xf86dgaproto
xf86vidmodeproto
xfsprogs
xproto
xz-utils
zlib

Size:

$ pacman -Qi $(pacman -Qq) | grep "Installed Size" | cut -d ' ' -f 4 | perl -lne '$x += $_; END { print $x; }'
493241

Offline

#12 2010-04-30 00:27:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Minimal Arch Linux Install

@bobdob
Are you sure you need 'ed'? :-)

W/o X-stuff, xfsprogs & similar packages you will still have, say, 350MB. Now you have to take you trusty hatchet and go to /usr: locale, doc, i18n, info. Then there's /var/lib/pacman ...

Offline

#13 2010-04-30 00:56:32

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: Minimal Arch Linux Install

karol wrote:

@bobdob
Are you sure you need 'ed'? :-)

Gone. Didn't realise it was still there.

When I originally started culling I only got rid of the pkgs I knew I didn't need. But there are some left that I'm not sure about. Like is udev needed in a chroot? I left xfsprogs in because its a xfs partition, but now I realise its not really needed either.

I'll have another look through the list this weekend and try and get it down to the bare minimum (with wine still working).

Offline

#14 2010-05-04 04:11:50

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Re: Minimal Arch Linux Install

so very sorry for the delay with my response.

I plan on using this for a basic desktop computer, mostly web and cloud computing. I am wanting to keep it as small as possible and boot as quickly as possible. seeing as how configurable arch is I thought it would be a good starting point.

I've tried trimming down the kernel but I just haven't seen a gain from it yet.

thanks for all the suggestions! I will give these a go when I get a chance.

Offline

#15 2010-05-05 01:24:20

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Minimal Arch Linux Install

gamewolf wrote:

I am wanting to keep it as small as possible and boot as quickly as possible.

http://wiki.archlinux.org/index.php/Twe … _boot_time
http://wiki.archlinux.org/index.php/Speedup_boot

Offline

#16 2010-05-05 02:00:29

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Minimal Arch Linux Install

Perhaps a "minimum install" could be a "live" flash install into ram with no HDD ...result... speedy performance in ram.

Just an alternate approach to "minimum" with the bonus of higher performance speed even with five or six hundred MB of packages....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#17 2010-05-10 01:41:52

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Re: Minimal Arch Linux Install

Well, I have been messing around with arch installs; removing packages from base, tweaking startup, etc. but I just cannot get the size down.

Is there no easy way to get the size down to under 100MB? I've even heard of some distros getting down to 50MB and lower. I love the arch system with pacman and startup scripts, but there just doesn't seem to be a way to get the size down to EASILY fit onto a small usb drive.

Any more suggestions?

Offline

#18 2010-05-10 18:28:16

jurkan
Member
From: Germany
Registered: 2010-04-03
Posts: 23

Re: Minimal Arch Linux Install

Well, you could try to use a compressed filesystem, but this isn't as easy as removing packages. To do that, you have to change init scripts and choose an appropriate filesystem like BTRFS or some of the compressed FUSE-Filesystems available. You can test the size before - just try to compress the whole stripped installation with gzip or lzma.

Offline

#19 2010-05-10 20:41:48

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Re: Minimal Arch Linux Install

Ah that sounds like a good idea. ill look into it. Thanks.

I still welcome any others too.

Offline

#20 2010-05-11 09:59:14

whacath
Member
Registered: 2009-05-26
Posts: 283

Re: Minimal Arch Linux Install

gamewolf wrote:

but there just doesn't seem to be a way to get the size down to EASILY fit onto a small usb drive.

Any more suggestions?

i dont think they make thumbdrives below 4 gigabytes anymore. wink

a 4 gigabyte thumbdrive cost about $10 or something like that. you can get a 32 gigabyte thumbdrive for about $60

so my suggestion is for you to buy a new thumbdrive.

Last edited by whacath (2010-05-11 10:01:45)

Offline

#21 2010-05-13 03:30:56

gamewolf
Member
Registered: 2009-12-02
Posts: 60

Re: Minimal Arch Linux Install

True, I do already have a 4 GB thumb drive. But I load mine up with a LOT of portable programs and I want to keep it as small as possible. Plus its like a challenge for me.

The only way I see getting below 100 MB would be to compile EVERY from source, which I am trying to avoid (I dont have the time for it.) I've been looking at building debian base systems, but the kernel itself takes up 100 MB. How does DSL and some others get so small?

Offline

#22 2010-12-10 22:23:09

esters
Member
Registered: 2006-11-04
Posts: 173

Re: Minimal Arch Linux Install

i used ext4 on a 4Gb SDHC card and 64mb on a usb stick (since Acer Aspire One doesn't natively boot from SD expansion slot)

mkdir -p /mnt/var/lib/pacman

pacman -Sy -r /mnt -b /mnt/var/lib/pacman
pacman -S -r /mnt filesystem grep find coreutils glibc bash pacman mkinitcpio kernel26 (i'm probably missing out some packages, but AFAIR these were the minimum packages i needed to succesfully get a clean base install of Arch)

mount --bind /dev /mnt/dev
mount --bind /tmp /mnt/tmp
mount -t proc none /mnt/proc
mount -t sysfs none /mnt/sys
cat /etc/mtab > /mnt/etc/mtab (remove the absolute path entries, e.g '/mnt" instead of "/"
chroot /mnt /bin/bash

after that poke around, tweak /etc/mkinitcpio.conf , /etc/rc.conf , /etc/hosts , /etc/fstab, build the kernel image

use syslinux instead of grub (saves some space)
also try to use tmpfs on /var/log and if you want to compile packages.

Look into uclibc, busybox, ash and other smaller alternatives to existing ones.

Offline

#23 2012-04-29 03:00:17

Storris
Member
Registered: 2012-04-26
Posts: 14

Re: Minimal Arch Linux Install

Is this still an ongoing project?  I'm wondering what you managed to get down to.  If it is:

1. Would it be any use in starting with your Browser and dependencies, working down from there and cutting everything else out? 2. Could you turn it into an installable image?

It would take some time on the Packages Wiki finding all necessary dependencies but you'd have a tiny distro.  This is going to be my project for the next week.
I think the difficult part is going to come in cutting redundant files from packages, redundant script from files and redundant lines from scripts.

Last edited by Storris (2012-04-29 03:06:05)

Offline

#24 2012-04-29 09:08:44

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Minimal Arch Linux Install

From a year and a half ago? Probably not.

I think you should be looking into Tiny Core or, my personal favourite, SliTaz. 35 MB with stuff like Openbox, Faenza icons, a package manager... Damn, it's basically my installed Arch (which takes up almost 7 GB without /home and /media). It even comes with chess and sudoku by default... Are you fricken kidding me??


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#25 2012-04-29 12:57:51

Storris
Member
Registered: 2012-04-26
Posts: 14

Re: Minimal Arch Linux Install

I did look at Tiny Core. It may be an option in a few months, when I know what I'm doing.  With Arch / Debian the flexibility of installing a needed package and dependants at a moments notice is really attractive.  And there is a massive amount of support for both on the Forums.

Offline

Board footer

Powered by FluxBB