You are not logged in.

#1 2011-08-24 12:24:40

PSW
Member
From: Brighton
Registered: 2011-06-15
Posts: 32

Slimming Arch Down onto a 1GB Flash Drive

I've installed Arch Linux onto a USB Stick however it seems I have underestimated the amount of space Arch Linux installs. I've done my best to keep everything as minimal as possible (openbox & tint2 & xterm & links) but since the base install takes up 600MB on it's own this isn't much help. In an attempt to slim it down I have started removing programs I never use from the installation, such as syslog-ng, cronie, vi, ect. However I don't know enough about the default packages to know what is safe to uninstall, could someone please tell me what packages are removable?

In addition, are there any files I can remove from the install? Difference languages, timezones, and locales for example? What about loading certain parts of the OS in the memory of the PC rather than from the USB stick?

Here is the packages I have installed:

pacman -Qt

alsa-lib 1.0.24.1-1
binutils 2.21.1-2
cryptsetup 1.3.1-2
dbus-glib 0.94-2
dhcpcd 5.2.12-1
gettext 0.18.1.1-3
grub 0.97-20
heirloom-mailx 12.5-2
inetutils 1.8-3
initscripts 2011.07.3-1
iputils 20101006-1
jfsutils 1.1.15-2
less 444-1
libevent 2.0.12-1
libxss 1.2.1-1
licenses 2.8-1
links 2.3-1
linux 3.0.3-1
lvm2 2.02.88-1
man-db 2.6.0.2-2
man-pages 3.32-1
mdadm 3.2.2-3
nano 2.2.6-1
nss 3.12.11-1
obconf 2.0.3.git20100309-1
obmenu 1.0-8
pacman 3.5.4-4
pcmciautils 018-1
ppp 2.4.5-2
procps 3.2.8-4
psmisc 22.14-1
reiserfsprogs 3.6.21-3
sudo 1.8.2-1
tar 1.26-1
tint2 0.11-4
ttf-dejavu 2.33-1
usbutils 004-1
vi 1:050325-1
wget 1.13.1-1
wpa_supplicant 0.7.3-3
xdg-utils 1.1.0rc1-3
xf86-video-intel 2.15.0-2
xfsprogs 3.1.5-1
xorg-server 1.10.3.901-1
xorg-xinit 1.3.0-3
xterm 271-1

pacman -Q

acl 2.2.51-1
alsa-lib 1.0.24.1-1
atk 2.0.1-1
attr 2.4.46-1
avahi 0.6.30-4
bash 4.2.010-1
binutils 2.21.1-2
bzip2 1.0.6-1
cairo 1.10.2-2
compositeproto 0.4.2-1
coreutils 8.12-3
cracklib 2.8.18-1
cryptsetup 1.3.1-2
damageproto 1.2.1-1
db 5.2.28-1
dbus 1.4.14-1
dbus-core 1.4.14-1
dbus-glib 0.94-2
desktop-file-utils 0.18-1
device-mapper 2.02.88-1
dhcpcd 5.2.12-1
diffutils 3.1-1
e2fsprogs 1.41.14-1
expat 2.0.1-6
file 5.08-1
filesystem 2011.08-1
findutils 4.4.2-3
fixesproto 5.0-1
fontconfig 2.8.0-1
fontsproto 2.1.1-1
freetype2 2.4.6-1
gawk 4.0.0-1
gcc-libs 4.6.1-3
gdbm 1.8.3-8
gdk-pixbuf2 2.23.5-1
gettext 0.18.1.1-3
giflib 4.1.6-4
glib2 2.28.8-1
glibc 2.14-5
gmp 5.0.2-3
gnutls 3.0.1-1
gobject-introspection 0.10.8-1
gpm 1.20.6-6
grep 2.9-1
groff 1.21-1
grub 0.97-20
gtk2 2.24.5-3
gtk-update-icon-cache 2.24.5-3
gzip 1.4-2
heirloom-mailx 12.5-2
iana-etc 2.30-2
imlib2 1.4.4-1
inetutils 1.8-3
initscripts 2011.07.3-1
inputproto 2.0.2-1
intel-dri 7.11-1
iproute2 2.6.39-1
iputils 20101006-1
jfsutils 1.1.15-2
kbd 1.15.3-1
kbproto 1.0.5-1
keyutils 1.5.2-1
krb5 1.9.1-3
less 444-1
libarchive 2.8.4-2
libcap 2.22-1
libcups 1.4.8-2
libdaemon 0.14-1
libdatrie 0.2.4-1
libdrm 2.4.26-1
libevent 2.0.12-1
libfetch 2.33-3
libffi 3.0.9-1
libfontenc 1.1.0-1
libgcrypt 1.5.0-1
libgl 7.11-1
libglade 2.6.4-2
libglapi 7.11-1
libgpg-error 1.10-1
libgssglue 0.3-1
libice 1.0.7-1
libid3tag 0.15.1b-6
libjpeg-turbo 1.1.1-3
libldap 2.4.26-3
libnl 1.1-2
libpcap 1.1.1-2
libpciaccess 0.12.1-1
libpipeline 1.2.0-1
libpng 1.4.8-1
libsasl 2.1.23-7
libsm 1.2.0-1
libtasn1 2.9-1
libthai 0.1.15-1
libtiff 3.9.5-1
libtirpc 0.2.2-2
libusb 1.0.8-1
libusb-compat 0.1.3-1
libx11 1.4.4-1
libxau 1.0.6-1
libxaw 1.0.9-1
libxcb 1.7-2
libxcomposite 0.4.3-1
libxcursor 1.1.12-1
libxdamage 1.1.3-1
libxdmcp 1.1.0-1
libxext 1.3.0-1
libxfixes 5.0-1
libxfont 1.4.4-1
libxft 2.2.0-1
libxi 1.4.3-1
libxinerama 1.1.1-1
libxkbfile 1.0.7-1
libxml2 2.7.8-1
libxmu 1.1.0-1
libxpm 3.5.9-1
libxrandr 1.3.2-1
libxrender 0.9.6-1
libxss 1.2.1-1
libxt 1.1.1-1
libxv 1.0.6-1
libxvmc 1.0.6-1
libxxf86vm 1.1.1-1
licenses 2.8-1
links 2.3-1
linux 3.0.3-1
linux-api-headers 3.0.1-1
linux-firmware 20110727-1
lvm2 2.02.88-1
man-db 2.6.0.2-2
man-pages 3.32-1
mdadm 3.2.2-3
mkinitcpio 0.7.2-1
mkinitcpio-busybox 1.18.5-1
module-init-tools 3.16-1
nano 2.2.6-1
ncurses 5.9-1
nettle 2.2-1
nspr 4.8.9-1
nss 3.12.11-1
obconf 2.0.3.git20100309-1
obmenu 1.0-8
openbox 3.5.0-3
openssl 1.0.0.d-1
pacman 3.5.4-4
pacman-mirrorlist 20110816-1
pam 1.1.4-1
pango 1.28.4-3
pciutils 3.1.7-4
pcmciautils 018-1
pcre 8.13-2
perl 5.14.1-3
pixman 0.22.2-1
popt 1.16-3
ppp 2.4.5-2
procps 3.2.8-4
psmisc 22.14-1
pygobject 2.28.6-1
pygobject-devel 2.28.6-1
pygtk 2.24.0-2
python2 2.7.2-2
python2-cairo 1.10.0-1
randrproto 1.3.2-1
readline 6.2.001-2
reiserfsprogs 3.6.21-3
renderproto 0.11.1-1
scrnsaverproto 1.2.1-1
sed 4.2.1-3
shadow 4.1.4.3-2
shared-mime-info 0.90-1
sqlite3 3.7.7.1-1
startup-notification 0.12-1
sudo 1.8.2-1
sysfsutils 2.1.0-6
sysvinit 2.88-2
tar 1.26-1
texinfo 4.13a-5
tint2 0.11-4
ttf-dejavu 2.33-1
tzdata 2011h-1
udev 173-3
usbutils 004-1
util-linux 2.19.1-3
vi 1:050325-1
videoproto 2.3.1-1
wget 1.13.1-1
which 2.20-4
wpa_supplicant 0.7.3-3
xbitmaps 1.1.1-1
xcb-proto 1.6-2
xcb-util 0.3.6-1
xdg-utils 1.1.0rc1-3
xextproto 7.2.0-1
xf86-input-evdev 2.6.0-3
xf86-video-intel 2.15.0-2
xf86vidmodeproto 2.3.1-1
xfsprogs 3.1.5-1
xineramaproto 1.2.1-1
xkeyboard-config 2.2.1-1
xorg-bdftopcf 1.0.3-1
xorg-fonts-alias 1.0.2-1
xorg-fonts-encodings 1.0.4-1
xorg-fonts-misc 1.0.1-1
xorg-font-util 1.2.0-1
xorg-font-utils 7.6-2
xorg-luit 1.1.0-2
xorg-mkfontdir 1.0.6-2
xorg-mkfontscale 1.0.9-1
xorg-server 1.10.3.901-1
xorg-server-common 1.10.3.901-1
xorg-setxkbmap 1.2.0-2
xorg-xauth 1.0.6-1
xorg-xinit 1.3.0-3
xorg-xkbcomp 1.2.3-1
xorg-xset 1.2.2-1
xproto 7.0.22-1
xterm 271-1
xz 5.0.3-1
zlib 1.2.5-4

Last edited by PSW (2011-08-24 12:28:58)

Offline

#2 2011-08-24 12:28:51

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

Re: Slimming Arch Down onto a 1GB Flash Drive

Removing syslog-ng, cronie and vi won't buy you much space. Dropping X stuff would surely help ;P
Have you considered using a tiny live distro like Slitaz or Tiny Core?

Offline

#3 2011-08-24 12:33:36

PSW
Member
From: Brighton
Registered: 2011-06-15
Posts: 32

Re: Slimming Arch Down onto a 1GB Flash Drive

karol wrote:

Removing syslog-ng, cronie and vi won't buy you much space. Dropping X stuff would surely help ;P
Have you considered using a tiny live distro like Slitaz or Tiny Core?

You are right, but if I wanted a simple command line environment I would just have a live USB. I haven't looked at those micro distros, but this is more of a fun project thing than a practical one - using them would be cheating.

Offline

#4 2011-08-24 12:39:19

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

Re: Slimming Arch Down onto a 1GB Flash Drive

Try https://aur.archlinux.org/packages.php?ID=43779 or https://bbs.archlinux.org/viewtopic.php … 88#p967288 or some expac script to find the biggest packages.

Yes, removing unused locales, manuals etc. would help.

Offline

#5 2011-08-24 12:59:22

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Slimming Arch Down onto a 1GB Flash Drive

squashfs compression is quite impressive, taking less than one third of the uncompressed.
If you don't plan to save all the changes, archiso is the way to go.
squashfs + aufs2 is a common combination used to create a "persistent" live USB system, but aufs2 support has been dropped by Arch. If you want a "persistent" live USB system which takes advantage of squashfs, you need to do some extra work...

There have to be other ways to do the same thing, but in a word, compression.


This silver ladybug at line 28...

Offline

#6 2011-08-24 12:59:25

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Slimming Arch Down onto a 1GB Flash Drive

If you don't need documentation and languages, then /usr/share/man, /usr/share/doc, /usr/share/info, /usr/share/locale can all be removed. Development stuff can be removed too, like /usr/lib/*.a and /usr/include. If this is not meant as a general purpose usb, you could also compile a custom kernel with just the modules you need.

Then trimming a whole bunch of other stuff and replacing a few bits with busybox, I got an install down to 94MB. 26MB with squashfs compression (plus 1.7MB kernel outside of the squashfs image).

Last edited by Gusar (2011-08-24 13:09:12)

Offline

#7 2011-08-24 13:18:59

PSW
Member
From: Brighton
Registered: 2011-06-15
Posts: 32

Re: Slimming Arch Down onto a 1GB Flash Drive

karol wrote:

Try https://aur.archlinux.org/packages.php?ID=43779 or https://bbs.archlinux.org/viewtopic.php … 88#p967288 or some expac script to find the biggest packages.

Yes, removing unused locales, manuals etc. would help.

Great application, helped me identify some large packages that could be removed. Freed up about 150MB. Thanks.


lolilolicon wrote:

squashfs compression is quite impressive, taking less than one third of the uncompressed.
If you don't plan to save all the changes, archiso is the way to go.
squashfs + aufs2 is a common combination used to create a "persistent" live USB system, but aufs2 support has been dropped by Arch. If you want a "persistent" live USB system which takes advantage of squashfs, you need to do some extra work...

There have to be other ways to do the same thing, but in a word, compression.

Squashfs is a read only FS? Sadly I can't really see that being a practical solution, although I suppose it would be workable with a second partition for saving files.


Gusar wrote:

If you don't need documentation and languages, then /usr/share/man, /usr/share/doc, /usr/share/info, /usr/share/locale can all be removed. Development stuff can be removed too, like /usr/lib/*.a and /usr/include. If this is not meant as a general purpose usb, you could also compile a custom kernel with just the modules you need.

Then trimming a whole bunch of other stuff and replacing a few bits with busybox, I got an install down to 94MB. 26MB with squashfs compression (plus 1.7MB kernel outside of the squashfs image).

Thanks for the locations. I did consider compiling a custom kernel, but I would like it to be able run on multiple computers. I suppose there is a lot of legacy hardware support I can remove from the kernel though.

Offline

#8 2011-08-24 13:35:33

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Slimming Arch Down onto a 1GB Flash Drive

PSW wrote:

Squashfs is a read only FS?

Squashfs is read-only, yes. But with aufs2 or the upcoming overlayfs you can combine two filesystems and have a writable system. All changes are written to the "upper" filesystem, while the "lower" squashfs remains as is. On livecd/liveusb distros the upper filesystem is usually tmpfs, but it can also be a persistent filesystem image.

However, if you plan to actually use the system as more than just a liveusb, and if you can spare 1GB for it, then compression is probably too much hassle. Though you could go with btrfs and it's built-in lzo compression.

PSW wrote:

Thanks for the locations. I did consider compiling a custom kernel, but I would like it to be able run on multiple computers. I suppose there is a lot of legacy hardware support I can remove from the kernel though.

I simply did a lot of guessing. I'm likely missing drivers for stuff that's in use today, but so far it has worked nicely on the few machines I tried.

Offline

#9 2011-08-24 14:27:59

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

Re: Slimming Arch Down onto a 1GB Flash Drive

Perhaps the OP would be interested in CTKArch which is less than 1GB archlinux based and downloadable, installable and very fast since it runs in ram.


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

#10 2011-08-24 14:33:16

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

Re: Slimming Arch Down onto a 1GB Flash Drive

lilsirecho wrote:

Perhaps the OP would be interested in CTKArch which is less than 1GB archlinux based and downloadable, installable and very fast since it runs in ram.

I wanted to suggest one of Arch-based liveCDs but I don't know if they support saving changes back to the USB (I never used them). I know Slitaz does that.

Offline

#11 2011-08-24 15:09:42

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Slimming Arch Down onto a 1GB Flash Drive

I used to run Arch on 1GB uncompressed.  I think the only X apps I had were Opera, Gnumeric and TightVNC.

I also wrote Pacgraph to find tight combinations.  For example,

pacgraph -c -m arch-repo app1 app2 app3

will tell you how much space all the apps will require on install.

Offline

#12 2011-08-24 17:00:35

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

Re: Slimming Arch Down onto a 1GB Flash Drive

The CTKArchLive is persistent and system changes can be made permanent with addon procedures.  The system runs in ram and can be applied very neatly as a Compact Flash HDD mode running in an adapter from IDE or Sata interface.  It uses aufs2 and squashfs as has been mentioned in the thread.

Not only does the CF mode run at HDD speeds but it has no seek time lags and the power required is less than 2 watts including the adapter.  No high-power HDD!


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

Board footer

Powered by FluxBB