You are not logged in.

#1 2016-04-07 17:22:05

FabioA
Member
Registered: 2016-04-07
Posts: 1

Smallest possible Arch installation with fully working LXDE

Hello everybody,

it's the first time I delve into the world of ArchLinux and so far it's been fun to discover how to achieve my goal by reading the (very well done!) wiki documentation and other stuff on the web.

However, I would like to make sure I did all I could to trim my Arch installation to fit into the 1GB Compact Flash card I must use in my setup whilst still having enough space for the custom application I need to deploy on it and a fully working LXDE environment with a fully working PCManFM that shows removable devices correctly automounted.

So far, I did the following.

  1. Installed most of the base group

  2. Installed LXDE

  3. Removed by hand the unneeded stuff (docs, locales, licenses, not used microcodes, not used kernel modules)

  4. Installed some other minor commodities.

This brought me to a system that weights about 770 MB and still has about 70MB of usable free space, that can do the following things:

  • Automatically connect to the wired network and get IP address and (some of the) routes from the DHCP

  • boot up in graphical mode

  • let me graphically browse the mounted devices with PCManFM

  • let me run python scripts

  • let me browse the web with dillo and elinks

  • let me use ssh to get into the system and out on other systems

  • some other minor things

What it cannot do:

  • automount removable devices and show them on the desktop/in PCManFM, despite the fact I instaled udisks2.

  • use PCManFM to browse a remote system via sshfs, or the devices on the computer via computer:///, or the network via network:///: it just says "operation not supported".

  • automatically get the default gateway from the DHCP. It. Just. Is. Not. There.

  • Give me enough free space to store the app and the logs and something more.

I'm therefore looking for solutions in order to get the functionalities that are not there yet.

Disk space

This is the list of installed packages so far:

acl
alsa-lib
archlinux-keyring
atk
attr
avahi
bash
beaver
bzip2
ca-certificates
ca-certificates-cacert
ca-certificates-mozilla
ca-certificates-utils
cairo
compositeproto
coreutils
cower
cracklib
cryptsetup
curl
damageproto
db
dbus
dbus-glib
desktop-file-utils
device-mapper
dhcpcd
diffutils
dillo
dnssec-anchors
dosfstools
e2fsprogs
elfutils
expat
fakeroot
file
filesystem
findutils
fixesproto
fltk
fontconfig
fontsproto
freetype2
fuse
gawk
gc
gcc-libs
gdbm
gdk-pixbuf2
gettext
giblib
giflib
glib2
glibc
glu
gmp
gnupg
gnutls
gpgme
gpicview
graphite
grep
gtk-update-icon-cache
gtk2
guile
gzip
harfbuzz
hdparm
hicolor-icon-theme
hwids
iana-etc
imlib2
inetutils
inputproto
intel-ucode
iproute2
iptables
iputils
jasper
js17
kbd
kbproto
keyutils
kmod
krb5
ldns
less
libarchive
libassuan
libatasmart
libatomic_ops
libcap
libcroco
libcups
libdaemon
libdatrie
libdbus
libdrm
libedit
libelf
libepoxy
libevdev
libexif
libffi
libfm
libfm-extra
libfm-gtk2
libfontenc
libgcrypt
libgpg-error
libgudev
libice
libid3tag
libidn
libjpeg-turbo
libkeybinder2
libksba
libldap
libnotify
libomxil-bellagio
libpciaccess
libpng
librsvg
libsasl
libseccomp
libsm
libssh2
libsystemd
libtasn1
libthai
libtiff
libtirpc
libtool
libtxc_dxtn
libunique
libunistring
libunwind
libusb
libutil-linux
libwnck
libx11
libxau
libxcb
libxcomposite
libxcursor
libxdamage
libxdmcp
libxext
libxfixes
libxfont
libxft
libxi
libxinerama
libxkbfile
libxml2
libxmu
libxrandr
libxrender
libxres
libxshmfence
libxt
libxxf86vm
linux
linux-api-headers
linux-firmware
llvm-libs
logrotate
lxappearance
lxde-common
lxde-icon-theme
lxdm
lxinput
lxlauncher
lxmenu-data
lxmusic
lxpanel
lxrandr
lxsession
lxtask
lxterminal
lz4
lzo
make
menu-cache
mesa
mesa-libgl
mkinitcpio
mkinitcpio-busybox
mpfr
mtdev
nano
ncurses
netctl
nettle
npth
nspr
openbox
openresolv
openssh
openssl
p11-kit
pacman
pacman-mirrorlist
pam
pambase
pango
pciutils
pcmanfm
pcre
perl
pinentry
pixman
polkit
popt
procps-ng
psmisc
python2
python2-xdg
randrproto
readline
renderproto
scrot
sed
shadow
shared-mime-info
slock
sqlite
sshfs
startup-notification
strace
sudo
sysfsutils
systemd
tar
texinfo
ttf-droid
tzdata
udisks2
unzip
util-linux
vte
vte-common
wayland
which
xcb-proto
xcb-util
xdg-utils
xextproto
xf86-input-evdev
xf86vidmodeproto
xineramaproto
xkeyboard-config
xmms2
xorg-bdftopcf
xorg-font-util
xorg-font-utils
xorg-fonts-alias
xorg-fonts-encodings
xorg-fonts-misc
xorg-mkfontdir
xorg-mkfontscale
xorg-server
xorg-server-common
xorg-server-xwayland
xorg-setxkbmap
xorg-xauth
xorg-xhost
xorg-xkbcomp
xorg-xrandr
xorg-xset
xproto
xz
yajl
zlib

Is there anything from the above list of packages that could be removed/changed in order to significantly trim the system even more while still keeping the functionalities I listed? I don't really need LXDE per se, I chose it because of its high functionalities/footprint ratio, but if there's something better I am not aware of I'm all for it.

Automounting

I read I could solve the issue by installing udiskie, but I don't have 106MB of free disk space, and I really don't want to have it just in order to get the volume icons on the desktop.

# pacman -S udiskie
resolving dependencies...
looking for conflicting packages...

Packages (12) gobject-introspection-runtime-1.46.0-1  libyaml-0.1.6-1  pygobject-devel-3.18.2-1  python-3.5.1-2  python-docopt-0.6.2-3
              python-gobject-3.18.2-1  python-packaging-16.6-1  python-pyparsing-2.1.1-1  python-setuptools-1:20.6.7-1  python-six-1.10.0-1
              python-yaml-3.11-3  udiskie-1.4.8-1

Total Download Size:    17.86 MiB
Total Installed Size:  106.06 MiB

I read I could use an udevadm script, like the one listed here, but that - correct me if I'm wrong - would not give me the icons on the screen.

Browsing non-local and non-file stuff

I read I should install gvfs but, again, I don't have enough space.

# pacman -S gvfs
resolving dependencies...
looking for conflicting packages...

Packages (24) adwaita-icon-theme-3.18.0-1  at-spi2-atk-2.18.1-1  at-spi2-core-2.18.3-1  colord-1.2.12-1  dconf-0.24.0-1  gcr-3.18.0-1
              glib-networking-2.46.1-1  gsettings-desktop-schemas-3.18.1-1  gtk3-3.18.9-1  json-glib-1.0.4-1  lcms2-2.7-1  libbluray-0.9.2-1  libcddb-1.3.2-4
              libcdio-0.93-3  libcdio-paranoia-10.2+0.93+1-1  libgusb-0.2.9-1  libproxy-0.4.12-1  libsecret-0.18.5-1  libsoup-2.52.2-1  libxkbcommon-0.6.0-1
              libxtst-1.2.2-1  recordproto-1.14.2-2  rest-0.7.93-1  gvfs-1.26.3-1

Total Download Size:    25.44 MiB
Total Installed Size:  127.83 MiB

Do I really need gvfs? If so, is there anything slimmer than PCManFM that can do what I want without all of these dependencies?

Default gateway

I did not have to do anything to configure the network, DHCP just worked by itself and netctl seems to be able to discover and bring up the interfaces by itself without me having to write one single line of configuration.

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0b:ab:aa:21:e0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.110.145/23 brd 192.168.111.255 scope global enp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::f1aa:11c5:f7a8:f88a/64 scope link 
       valid_lft forever preferred_lft forever
3: enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0b:ab:aa:21:e1 brd ff:ff:ff:ff:ff:ff

However, I don't get the default gateway in the routing table.

# ip route
192.168.70.0/24 via 192.168.110.61 dev enp1s0  src 192.168.110.145  metric 202 
192.168.110.0/23 dev enp1s0  proto kernel  scope link  src 192.168.110.145  metric 202

I know the DHCP provides it because all the other systems on the same network do get it.

For instance, on my ubuntu box:

$ ip route
default via 192.168.110.1 dev eth0  proto static  metric 100
[...]

I promise I RTFM and waded through tens of web pages, but to no avail.

___
Sorry for the very long post and thanks in advance for your attention!

Last edited by FabioA (2016-04-07 17:34:43)

Offline

#2 2016-04-07 17:49:23

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Smallest possible Arch installation with fully working LXDE

You say you are at 770MB of 1GB.  After you installed everything did you delete pacman's cache to claim back that space?

# pacman -Scc

1GB is really tiny, I hope you have good luck with it.

Offline

#3 2016-04-07 18:24:38

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Smallest possible Arch installation with fully working LXDE

I would suggest making use of pacman.conf and the NoExtract directive, so pacman automatically skips useless directories in the future as well.

Another directory you might want to clean up -- /usr/include/


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2016-04-07 18:38:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: Smallest possible Arch installation with fully working LXDE

Arch is probably not the right tool for this job.  Arch is not small.  It is "minimalist" depending on your definition of minimal.  But if your definition of minimal is small on disk, then minimalist arch is not.

For that look for a distro based on busybox.  Slitaz was a lot of fun years ago, but I haven't kept up with it and I have no idea how it is now.

But as for slimming what you have, get rid of LXDE!  Why do you need a DE?  Remove all the stuff that LXDE pulls in and just install what you actually use: openbox as the WM (this is the WM used in LXDE), pcmanfm as you want that file manager.  But do you need lxde's picture viewer?  Do you need a picture viewer at all?  If so, try feh. Do you need lxpanel?  Do you need lxlauncher? Do you need lxsession, lxterminal, etc?

EDIT: It seems slitaz has switched to a rolling release model.  I may have to check it out again.  The full root filesystem is around 100MB with most of the things you've said you need.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-04-07 19:11:34

jamtat
Member
Registered: 2008-03-13
Posts: 224

Re: Smallest possible Arch installation with fully working LXDE

This is a timely post for me; I need to do a very similar thing using a 1GB flash drive--of which I have a couple of spare ones laying around. My use scenario is to run Arch from an older computer, owned by a relative, that I must use a few times per month, and that still runs XP. I just don't feel comfortable any longer accessing the internet from that machine/OS.

I personally would not choose LXDE as a graphical environment, favoring rather i3 as my WM of choice. And I don't need to do other things you're after, like auto-mounting. What I will mainly need for this installation is a browser, a pdf reader, an image viewer (would probably go with feh), and maybe some lightweight application that would allow me to view and perhaps edit M$ Word docs.

I've looked into f2fs as the filesystem for the main partition and have partitioned and formatted the drive with a 67MB /boot partition (ext2) and the rest dedicated to the OS and formatted f2fs. But I am uncertain I'd be able to fit the few things I'll need in this installation in the limited space I have--930MB, according to cfdisk.

Have you put together any documentation regarding the trimming steps you took? I'd like to use Arch for this, since it's the distro I mostly these days. That said I do have a bit of experience with TinyCore, Alpine, and minimalist Debian configuration. Hope you'll be informing in this thread about your progress.

Offline

#6 2016-04-08 04:07:48

jamtat
Member
Registered: 2008-03-13
Posts: 224

Re: Smallest possible Arch installation with fully working LXDE

Just did a test install of Alpine Linux on my thumb drive. Kind of a pain since the documentation is a bit of a mess. But it's an interesting project and I now see that I probably could have used it for a recent task that involved turning an old netbook into a router. Anyhooz, with almost everything I'd need to install for this USB drive to run the OS as I've described, a little over half the drive is used up (ca. 550 MB). If it turns out I won't need to install any other large programs, Alpine could be workable for my scenario.

Offline

Board footer

Powered by FluxBB