-   Linux - Desktop (
-   -   Triying to boot faster. Grub's taking too long (

matiasar 01-26-2012 08:53 AM

Triying to boot faster. Grub's taking too long
I'm trying to make an old PIII box to boot as fast as possible. I'm planning to use it as a headless (no monitor, no GUIs) music player, based on mpd.

I found that Grub (tried the current Grub2 and legacy Grub) is taking to long to start. In the stage "Loading Grub" or "Grub Loading Stage1.5" (Grub-Legacy) takes almost 10 seconds.

Does anybody know if there is a way to turn grub faster in this old hardware? Any other suggestion?
I'm using Debian Squeeze.

Thanks in advance,

H_TeXMeX_H 01-26-2012 09:47 AM

Grub is very fast. If you want you can try using lilo with the 'compact' option, but it may not help

One way it speed it up is reduce the size of the kernel ... remove unneeded junk that is built-in. Only build in what you need to boot, the filesystem drivers and the IDE/SATA/AHCI drivers.

Also disable startup services that you don't need.

DavidMcCann 01-26-2012 12:34 PM

If you're using Debian, I presume you're using System V init scripts. You can speed booting a bit by using
systemd: in Fedora, Suse, Mageia; Debian is opposed to it
upstart: in Ubuntu; may be in the Debian repository

matiasar 01-26-2012 03:43 PM

Thanks for your kind replies fellows.
Finally I improved Grub (I stick with legacy) speed using "profile" boot option. That appeared to had improved speed.

Today, I compile my own kernel, extracting lot of things I won't use.
I was wondering if is possible to use the uncompressed kernel image (vmlinux) in order to reduce decompression time in boot up. I tried it, googled a little bit, but I think that's no possible...

About SysV that's a good idea I think I'll give it a try.


jefro 01-26-2012 05:45 PM

I'd think you may not need grub. Lilo may be fine.

H_TeXMeX_H 01-27-2012 02:56 AM

If you think the CPU is not fast enough when decompressing, use the 'lzo' compression for the kernel, that should speed it up.

If the RAM is slow you want better compression than gz or lzo, so I would maybe use xz in that case. If both are slow, there's not much to do.

matiasar 01-27-2012 07:31 AM


That's very interesting. I'll do some test.
I'm quite new to kernel compilling, I think compression type is selected in make menuconfig "kernel compression mode".
I was using gzip, so I'll test with lzma.

"xz" seems no to appear there. Should I need a particular package in order to use that compression algorithm?

H_TeXMeX_H 01-27-2012 07:44 AM

xz is only available in recent kernels I think.

matiasar 01-27-2012 03:03 PM

Thanks a lot.
I recompiled my kernel image using lzma, final size was almost 300 kb smaller. No big difference in decompression time, may be a couple of seconds, previously I was using gzip.
Yes, as I'm dealing with quite old hardware I decided to use version

Was worth for learning a little on kernel compilation. Regards.

All times are GMT -5. The time now is 04:03 PM.