[systemd-devel] experiments with 'minimal build'

Lukáš Nykrýn lnykryn at redhat.com
Thu Mar 19 00:38:57 PDT 2015


Alison Chaiken píše v St 18. 03. 2015 v 00:07 -0700:
> After reading about the 'minimal build' on the systemd wiki, I decided
> to experiment.
> 
> 0. WIth basically all options turned on, in a Fedora 21 Qemu, systemd
> used about 300 MB of memory according to 'sudo memstat -p 1'.
> 
> 1. With ./configure --disable-gtk-doc --disable-seccomp
> --disable-selinux --disable-apparmor --disable-xz --disable-zlib
> --disable-pam --disable-acl --disable-smack --disable-gcrypt
> --disable-audit --disable-elfutils --disable-libcryptsetup
> --disable-qrencode --disable-microhttpd --disable-gnutls
> --disable-libcurl --disable-libidn  --disable-quotacheck
> --disable-vconsole --disable-logind --disable-machined
> --disable-importd --disable-hostnamed --disable-timedated
> --disable-localed --disable-polkit --disable-resolved
> --disable-networkd --disable-efi --disable-manpages
> --disable-hibernate --disable-tests
> 
> [achaiken at localhost systemd (master)]$ ./systemd --version
> systemd 219
> -PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP
> -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP +BLKID -ELFUTILS
> +KMOD -IDN
> 
> In this case, 'memstat -p 1' says systemd uses about 119 MB of memory.
> 
> 2. Reducing even further,
> 
> ./configure --disable-gtk-doc --disable-seccomp --disable-selinux
> --disable-apparmor --disable-xz --disable-zlib --disable-pam
> --disable-acl --disable-smack --disable-gcrypt --disable-audit
> --disable-elfutils --disable-libcryptsetup --disable-qrencode
> --disable-microhttpd --disable-gnutls --disable-libcurl
> --disable-libidn  --disable-quotacheck --disable-vconsole
> --disable-logind --disable-machined --disable-importd
> --disable-hostnamed --disable-timedated --disable-localed
> --disable-polkit --disable-resolved --disable-networkd --disable-efi
> --disable-manpages --disable-hibernate --disable-tests  --disable-nls
> --disable-python-devel --disable-utmp --disable-xkbcommon
> --disable-ima --disable-blkid --disable-binfmt --disable-tmpfiles
> --disable-sysusers --disable-firstboot --disable-randomseed
> --disable-backlight --disable-rfkill --disable-timesyncd
> --disable-coredump --disable-myhostname
> [achaiken at localhost systemd (master)]$ ./systemd --version
> systemd 219
> -PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP
> -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP -BLKID -ELFUTILS
> +KMOD -IDN
> 
> Now Qemu doesn't boot because "Dependency failed for /boot"
> "Dependency failed for /home".   From emergency shell, 'journalctl -p
> err' shows 5 udev failures and 8 systemd ones.   /boot and /home are
> empty because fedora-home and the UUID-labelled object are absent in
> /dev/mapper.   The last successful target is Swap.
> 
> Hypothesis: the failure happened because I turned BLKID off.   Does
> that sound right?   Does systemd not work without BLKID?   Would it
> work with BLKID off it it hadn't previously been on at installation?
> 
You can run you system without blkid, just change fstab to use /dev/sd*
instead of UUIDs.


> Obviously this was a sandbox experiment and nothing valuable was lost,
> but nonetheless I'm curious.   I assume that turning off KMOD and
> perhaps SYSVINIT isn't safe either?
> 
> Thanks for any suggestions,
> Alison
> 
> 




More information about the systemd-devel mailing list