# Prelink and rkhunter

## FizzyWidget

If i have prelink enabled, or in this case if i have the file /etc/prelink.cache , rkhunter says that nearly all files in /bin /usr/bin and usr/sbin are the wrong file size and need checking, I have ran rkhunter --propupd , but it still says the files are bad, if i delete /etc/prelink.cach and run rkhunter --propupd and then run rkhunter it says the files are okay

Other than reading that prelinking can give you a performance boost should i use it on my system and just use this method to use rkhunter or remove prelinking?

----------

## BigBox37

 *Dark Foo wrote:*   

> If i have prelink enabled, or in this case if i have the file /etc/prelink.cache , rkhunter says that nearly all files in /bin /usr/bin and usr/sbin are the wrong file size and need checking, I have ran rkhunter --propupd , but it still says the files are bad, if i delete /etc/prelink.cach and run rkhunter --propupd and then run rkhunter it says the files are okay
> 
> Other than reading that prelinking can give you a performance boost should i use it on my system and just use this method to use rkhunter or remove prelinking?

 

As an alternative to prelinking i'd suggest e4rat if you use ext4: blazing speed on my system (really!)

http://en.gentoo-wiki.com/wiki/E4rat

Note that the location of e4rat is /sbin/e4rat-* not /usr/sbin/e4rat-* as it says in the wiki...

init=/usr/sbin/e4rat-* --> init=/sbin/e4rat-collect, init=/sbin/e4rat-preload etc...

----------

## ultraslinky

BigBox37, I'd like to try that e4rat you linked  :Smile:  however, is there a way to use it with Lilo instead of Grub? I wouldn't know where to put "init=/usr/sbin/e4rat-collect" with Lilo. Should i use "append="? 

Like now, in Lilo i have my kernel and after that i have: append="pcie_aspm=force".

Would that become: append="pcie_aspm=force init=/sbin/e4rat-collect" ?

Thanks!

----------

## ultraslinky

actually i just did that and it worked  :Smile: 

----------

## BigBox37

 *ultraslinky wrote:*   

> actually i just did that and it worked 

 

Cool   :Razz:   Fast   :Question: 

----------

## ultraslinky

Actually.... e4rat-collect worked like a charm, i have my log file and inside it are lots of files i can recognize from the startup sequence  :Smile:  But after i switched to runlevel 1, and i ran e4rat-prealloc, it just complained that "no optimization was possible", without telling me why. Maybe it's because i only have 10% disk space left? Do i need more than that?

EDIT: actually, i could rerun the command with the ">" operator so i can get the exact output on a text file. then i could post it here!

----------

## ultraslinky

Wowza..... Well this is very nice  :Smile:  it makes loading my XFCE4.8 desktop take only 1,5 seconds total! but the problem is, it takes far more to actually load itself, and it makes the services start slower... I don't know, maybe my hard disk is a bottleneck here? Crappy 5400 rpm laptop disk. Anyhow, it seems very promising!

----------

## BigBox37

 *ultraslinky wrote:*   

> Wowza..... Well this is very nice  it makes loading my XFCE4.8 desktop take only 1,5 seconds total! but the problem is, it takes far more to actually load itself, and it makes the services start slower... I don't know, maybe my hard disk is a bottleneck here? Crappy 5400 rpm laptop disk. Anyhow, it seems very promising!

 

The initial kernal initialisation slowdown is a tradeoff again binaries loading much quicker on your desktop - it's not just about boot-time!!

Here is how I do e4rat the slow manual way: I use bash scripts to do the following...

# sudo nano /etc/rc.conf {uncomment rc_interactive="NO"}

# sudo nano /etc/e4rat.conf {uncomment timeout  240} [SET COLLECTION TIME TO 240 seconds]

# sudo rm /var/lib/e4rat/startup.log [REMOVE OLD LOG]

reset grub/lilo to e4rat-collect {init=/sbin/e4rat-collect} [INSTRUCT E4RAT TO COLLECT DATA]

reboot to default desktop

Run all your default programs once within the alloted 240 seconds, libreoffice, firefox, gimp ... Wait for 240 seconds to finish.

comment out grub/lilo e4rat instructions {#init=/sbin/e4rat-collect}

# sudo rc-update del xdm default [BOOT TO TERMINAL]

reboot to terminal

# sudo e4rat-realloc /var/lib/e4rat/startup.log [WAIT FOR COMPLETION : IGNORE ALL WARNINGS!!]

reset grub/lilo to e4rat-preload {init=/sbin/e4rat-preload} [INSTRUCT E4RAT TO PRELOAD DATA ON BOOT]

# sudo rc-update add xdm default

reboot to desktop and all done and zoom zoom  :Smile: 

----------

## ultraslinky

Wow, thanks BigBox37 for the clear instructions  :Smile:  I think you forgot to switch to runlevel 1, like described in the wiki, but maybe it isn't necessary after all?

I'm going to bed now so I will try this tomorrow morning. Yeah i do notice about my Gentoo box that first time actions, like first time opening start menu, first time opening Chromium, they are slow. So i will do all those actions in e4rat's 240 seconds and see the results. Bis morgen  :Smile: 

----------

## BigBox37

 *ultraslinky wrote:*   

> Wow, thanks BigBox37 for the clear instructions  I think you forgot to switch to runlevel 1, like described in the wiki ...

 

Switching to run level 1 is the same thing as booting to a terminal - all i am doing here is manually rebooting rather than switching  to a terminal from a desktop environment (in an attempt to make it clearer how this process works).  :Wink: 

The instructions above will accomplish everything you need to utilise e4rat's super speed.   :Smile: 

----------

