Optimizing GNU / Linux boot with E4rat

Yesterday a friend told me about e4rat (Ext4 - Reducing Access Times) a set of tools to speed up the boot process of our system and today, I decided to give it a try.

Searching i found in linuxzone.com a tutorial for its installation and an explanation of its operation. I quote here verbatim:

You may find that with the passage of time your system becomes somewhat heavier and it takes a long time to load your OS.This is something common in all systems and the main cause is usually the search and loading of the files necessary for startup, since the system usually has to scan the entire disk to find them. To avoid this and optimize your Boot, there are tools like e4rat.

E4rat (Ext4 - Reducing Access Times) is a set of tools to speed up the boot process, as well as the applications that load at startup, registering the files used in the first 2 minutes of boot, relocating and preloading them, thus eliminating time search and rotation delays. This leads to a high hard drive transfer rate.

The process consists of three steps: collecting information about startup, reassigning the files, and then putting them to load at every boot.

Keep in mind that this only works with magnetic disks and they need to be formatted in ext4.

We will start by downloading the program from your pageIn this case I will download the .deb file, since I will be using Ubuntu 11.04.

Before installing it, we must delete ureadahead, so that it does not conflict:

sudo dpkg --purge ureadahead ubuntu-minimal

Note: Before purge, there are two hyphens.

We install the dependencies for e4rat:

sudo apt-get install libblkid1 e2fslibs

Then we install the program.

Now I am going to explain to you as easily as possible how to make it work. First, we must edit our grub or grub2 as the case may be:

sudo nano /boot/grub/grub.cfg

Inside the file we look for a line similar to this:

linux   /boot/vmlinuz-2.6.38-10-generic root=UUID=92f37630-c3b4-476b-a0ab-f4a0d9f4180f ro

we add the following at the end of the line:

init=/sbin/e4rat-collect

In my case, it looks like this:

linux   /boot/vmlinuz-2.6.38-10-generic root=UUID=92f37630-c3b4-476b-a0ab-f4a0d9f4180f ro   quiet splash vt.handoff=7 init=/sbin/e4rat-collect

Note: The previous step we can do exactly the same from startup, when the grub screen comes out, we are on the line of our OS and press'e'to edit it. In the event that you have several systems installed on the disk, it is easier to do so, since we avoid getting involved with the startup of the others.

Once this is done, we close the editor Ctrl + X, and we restart our computer.

When it finishes loading the system, we must open the programs that we usually start more often, such as the browser, mail manager, etc ..., we have two minutes to do it. Once this is done we make sure that the log file has been created.

ls / var / lib / e4rat /

The answer must be startup.logIf it does not show you anything, you will have to repeat the steps again.

Now we go back to editing the grub, this time we do it from the home screen by pressing e, as I explain above. And we add at the end of the line from before single, being as follows:

linux   /boot/vmlinuz-2.6.38-10-generic root=UUID=92f37630-c3b4-476b-a0ab-f4a0d9f4180f ro single

We close and restart, but this time we do it in safe mode or from the line of commands. Log in with our username and password and execute:

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

Once this is done, e4rat begins to move the files from your disk, (it may take a while), when it finishes, we restart.

sudo shutdown-r now

So that the program always runs at the beginning and lasts even if we update, we edit our grub,

sudo nano /etc/default/grub

and we look for the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

We add the following line before quiet splash,

init=/sbin/e4rat-preload

Staying this way.

GRUB_CMDLINE_LINUX_DEFAULT="init=/sbin/e4rat-preload quiet splash"

We save the file, and reload the grub:

sudo update-grub

And we have it, from now on the necessary programs will be loaded more quickly.

For more information, you can visit their page sourceforge.

In a while I will try it and if I don't return, it will be because my hard drive will have died


The content of the article adheres to our principles of editorial ethics. To report an error click here.

13 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   elav <° Linux said

    It works f ** king !!! You can see that the applications open faster 😀

  2.   Carlos said

    Great, I'll try it in LMDE ... I'll tell you how it goes.

    Greetings.

  3.   fredy said

    The same, if I don't return quickly, I'll come back later hehe.

    1.    fredy said

      After several attempts, no, it did not work.

      I will try again but another day.

      1.    elav <° Linux said

        It worked for me, and KZKGGaara, before throwing his Archlinux to the ground too hahahaha

        1.    nerjamartin said

          OMG! what happened to it? o_0

          1.    nerjamartin said

            Ehem! again I write from the job! ^ _ ^ U
            Do not believe that I have gone to the «dark side» !!! hehehe

            1.    elav <° Linux said

              Normal, today KZKGGaara appeared with Windows 7 installed 😀


  4.   Erythrym said

    It works like a charm! Programs start a lot faster! Thank you very much for the advice! 😀

  5.   dhunter said

    I discovered that there is a step that can be skipped:

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

    Once this is done, e4rat begins to move the files from your disk, (it may take a while), when it finishes, we restart.

    sudo shutdown-r now ## THIS REBOOT IS MORE

    So that the program always runs at the beginning and lasts even if we update, we edit our grub,

    sudo nano /etc/default/grub

  6.   erunamoJAZZ said

    Well, I just tried it, and the truth is that the change is not much: /, and that I haven't formatted for almost a year.

  7.   Angel de la vega said

    Good afternoon, I followed the steps to the letter but it did not work, even the startup.log file is not created and check the programs that start and e4rat does not start, I have Ubuntu 13.04, the truth is already driving me something crazy ... I would appreciate your help

  8.   Mario said

    Excellent this step from starting in 1 minute 40 seconds to 29 exact seconds !!!!!!!!!! Thank you very much although they do not explain it at all well but experimenting I achieved it thanks