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
Y we add the following at the end of the line:
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:
We add the following line before quiet splash,
Staying this way.
GRUB_CMDLINE_LINUX_DEFAULT="init=/sbin/e4rat-preload quiet splash"
We save the file, and reload the 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