You are not logged in.

#1 2009-07-02 15:39:59

jpersson
Member
From: Malmö, Sweden
Registered: 2009-07-02
Posts: 2
Website

How small can an installed Arch Linux be

Hi,

I'm thinking about using Arch Linux for an embedded device, but it seems like (have to double check this) that a fresh install of the base system roughly occupies around 400 Mb. So my question is simple: How small can Arch Linux be tailored to be if you remove some of the base packages (and can they be removed)?

Cheers
    //Jan Persson

Offline

#2 2009-07-02 16:28:51

ak-89
Member
From: Finland
Registered: 2008-08-26
Posts: 86
Website

Re: How small can an installed Arch Linux be

Yes they can be removed, but you will not get much smaller system even if you remove them.

Arch uses glibc which is the "normal" libc for desktop/server Linuxes, there is uclibc and few similar that are made for use with embedded devices. Software compiled against libc that is made for embedded system will produce smaller binaries. Then there is some smaller and more limited apps made for embedded systems that are supposed to replace some of the normal basesystem apps, like busybox for ls/dir/etcclitools and dash for shell.

You should use distro that's made for embedded devices or make your own. I think there was somekind of uclibc-based arch project, but I don't know if it's still alive.

I don't know what kind of embedded device you are using, but doesn't most of the embedded devices use ARM-processor or something like that, that isn't x86 compatible? What processor it is using and how much space you have for OS?

Offline

#3 2009-07-02 18:00:14

sa
Member
From: boston ma
Registered: 2008-05-23
Posts: 127
Website

Re: How small can an installed Arch Linux be

why not use something like Tiny Core Linux? it seems like that would make more sense for an embedded system.

Offline

#4 2009-07-02 18:21:28

jpersson
Member
From: Malmö, Sweden
Registered: 2009-07-02
Posts: 2
Website

Re: How small can an installed Arch Linux be

Thanks for the responses. It is an x86 based industrial PC with 1 Gb of primary memory and 4 Gb of flash.
However, I need the flash for other purposes, so making the OS as small as possible is a priority for me.

Maybe I should look at the other distro that you are mentioning. I really like Arch, but if it demands 400 Mb
of disk, I probably have to look at another alternatives.

Offline

#5 2009-07-02 19:47:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How small can an installed Arch Linux be

Did you look into Puppy Linux and Damn Small Linux?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2009-07-02 23:09:32

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: How small can an installed Arch Linux be

You can use du -hs <directory>/* as root to find the largest files in <directory>.
And pacman -Ql <pkg> | wc -l to find out how many files a package has.


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#7 2009-07-02 23:31:07

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: How small can an installed Arch Linux be

My default Arch install is about ~300M. I use an older CD 2007.2 I think it is (not sure) where you can select your base packages too. I heard that isn't in any of the newer LiveCDs, but I also know that pacman has a feature, a -r, to have an alternative from root. Youcan created your own partitions, appl the filesystems, mount it, and use pacman -r. I recall running into issues with things like bash, kernel26, klibc-*, and all those good guys when I tried this by just trying to do it normally so you'd probably have to use -f to force it or something (honestly not sure - I forget, but I took notes in my notebook, which is what I am looking at right now). Pretty much here is the list of guys I installed too.

acl
attr
bash
bzip2
coreutils
cracklib
db
dhcpcd
e2fsprogs
fakeroot
file
filesystem
findutils
gawk
gcc-libs
gdbm
gen-init-cpio
gettext
glibc
grep
groff
grub
groff
gzip
initscript
iputils
jgsutils
kbd
kernel-headers
kernel26
klibc
klibc-extras
klibc-udev
less
libarchive
libdownload
man
man-pages
mkinitcpio
mktemp
modules-init-tools
ncurses
net-tools
openssl
pacman
pam
pciutils
pcre
perl
procps
psmisc
readline
resierfsprogs
sed
shadow
sysvinit
tar
udev
utils-linux-ng
vi
wget
zlib

That's about the smallest I can get it. 100MB saved? You can lose the klibc-* guys and kernel26 I think if you compile your own kernel. Lose udev if you use static /dev (using mknod to create your own device nodes, I wrote this all in a post that had to do with decreasing your boot time, speeding up your computer, and such all here - I just mentioned about statid /dev)

Then to edit everything, of course, you'll have to

mount -t proc /mnt/proc
mount -o bind /dev /mnt/dev
mount -n -t sysfs none /sys

to chroot into it and edit the necessary files.

Of course after that, install grub (or whatever your choice of bootloader is). Don't know how well this works on embedded devices (or what that even is suppose to mean.. I am such a noob, wah!).

Last edited by Aprz (2009-07-02 23:34:11)

Offline

#8 2009-07-04 08:27:11

Daemonjax
Member
Registered: 2009-07-02
Posts: 48

Re: How small can an installed Arch Linux be

I second checking out tinycore linux... it's pretty snappy big_smile  It's about 11 megs on CD.

Last edited by Daemonjax (2009-07-04 08:27:36)

Offline

Board footer

Powered by FluxBB