Guide: Optimize boot speed using e4rat on fedora 17

This post covers the installation and usage of e4rat on fedora 17.

Some Background

Tohie commented on Fedora 17 Boot Optimization(from 15 to 2.5 seconds). that using e4rat. may further increase booting speed. Most steps from Fedora 17 Boot Optimization aren’t useful for me mainly because I installed my system on LVM configuration. Those services Harald disabled are essential on my system.

Before installation

Make sure you have these dependencies installed.

$ sudo yum install groupinstall “Development Tools”

$ sudo yum install libstdc++-static bzip2-devel boost-devel boost-static boost-regex e2fsprogs-devel audit-libs-static audit-libs-devel

Download the source code and extract. Edit CMakeLists.txt found from the the extracted file. Find set(Boost_USE_STATIC_LIBS ON) and set it to set(Boost_USE_STATIC_LIBS OFF).This is necessary because the default static build of Boost does not contain boost-regex, which is required by e4rat.


In the e4rat source directory, run

$ cmake . -DCMAKE_BUILD_TYPE=release

$ make

$ sudo make install

Collecting log

e4rat-collect can not be started when auditd is started. So first, we need to disable auditd.

$ sudo systemctl disable auditd.service

Reboot your machine and when grub appears, hit e to edit the boot script. append init=/sbin/e4rat-collect to your kernel parameters. Then hit Control-X to boot. After fedora booted, login and start your normal routine. 2 minutes after booting, e4rat-collect terminated and generated file list is stored at /var/lib/e4rat/startup.log

Reallocate boot files

then run

$ sudo init 1

to get into single user mode

Reallocate boot files with

e4rat-realloc /var/lib/e4rat/startup.log

Setup preload

Edit your default kernel parameters in /etc/default/grub: Append init=/sbin/e4rat-preload to the line kernel parameters defined in GRUB_CMDLINE_LINUX. Then runL

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Enable previously disabled auditd

$ sudo systemctl enable auditd.service

Reboot fedora again and you should be able to benefit from e4rat.

.. _Fedora 17 Boot Optimization(from 15 to 2.5 seconds): .. _e4rat: