e4rat (Ext4 - Reducing Access Times) is a set of tools for speed up the boot process, as well as the applications that load at startup, registering the files used in the first 2 minutes of startup, relocating them y preloading them, thus eliminating search times and rotation delays. This leads to a high hard drive transfer rate. |
The process consists of three steps: gathering information about startup, reassigning the files, and then loading them at each startup.
We will start with download the program.
Before installing it, we must delete ureadahead, so that it does not conflict with it:
sudo dpkg --purge ureadahead ubuntu-minimal
We install the dependencies for e4rat:
sudo apt-get install libbblkid1 e2fslibs
Then we install the program.
Now I am going to explain 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
And 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
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 restart.
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.log, if 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 explained above. And we add the single parameter to the end of the line that we mentioned before, 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 command line. 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
We already have it. From now on, the usual programs will load more quickly at startup.
For more information, you can visit the project page at sourceforge.
Source: linux-zone
Hello good, thanks for answering, I have tried to do it but I have not succeeded, if you have time to update the post with LM it would be very good, thanks Pablo.
At the time I had tried it with Ubuntu. I guess there should be big differences with LM.
Cheers! Paul.
Hello good for the contribution, my question is if you have tried it with LM 13? Works?.
Saludos y gracias
Exact! It can also be used in other distros. The idea was to introduce the program, explain the installation steps for the newest (generally Ubuntu users and most of the blog readers). Those who use other distros will surely know what to do or where to look for more info.
Cheers! Paul.
I have tried it and the truth is that I lost my gdm, I am using trisquel 5.0 that is based on Ubuntu 11.04, I want to know if there is any file to edit to be able to recover my graphical environment, thanks
It can also be used for other distros, for example Archlinux ñ.ñ
https://wiki.archlinux.org/index.php/E4rat_%28Espa%C3%B1ol%29
regards
It won't let me install it, this is what I get in the terminal:
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1138 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt: 20 (find_package)
CMake Error at src / cmake / Findext2fs.cmake: 17 (MESSAGE):
Could not find ext2fs
Call Stack (most recent call first):
src / CMakeLists.txt: 57 (FIND_PACKAGE)
- Configuring incomplete, errors occurred!
regards
Ok, you can download the deb package, the sources were downloaded directly to me.
Registry, relocation, and file preloading looks good, but ...
Does it take so long to start a Linux distribution? Is it a matter of the services that we have running? Do we keep complaining about the same thing?
It does not take me more than to turn on the cell phone and enter the identification code, and I have a drama with Ext4 since my current rescue distro, Slax, does not manage this file system at the moment, which already takes time. 😉
Does something like this happen to anyone else?
You have to edit the grub configuration file as super user of the system ... Obviously this way it won't save the changes. Cheers…
Only for Ubuntu?
Well, I have problems when editing from boot.
Pulse e, adding single to the line and pulse ctrl + x
After this the screen goes black and I have to restart.
I go back into the editor and see that the change has not been saved.
regards
Thanks, it worked perfectly on Debian. Too many dependencies (libboots) but everything ok.
I guess this optimization is useless for SSD drives, right?