LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-26-2012, 07:53 AM   #1
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Blog Entries: 1

Rep: Reputation: 31
Triying to boot faster. Grub's taking too long


Hi.
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,
Matías
 
Old 01-26-2012, 08:47 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-26-2012, 11:34 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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
or
upstart: in Ubuntu; may be in the Debian repository
 
Old 01-26-2012, 02:43 PM   #4
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321

Original Poster
Blog Entries: 1

Rep: Reputation: 31
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.

Regards.
 
Old 01-26-2012, 04:45 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I'd think you may not need grub. Lilo may be fine.
 
Old 01-27-2012, 01:56 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 01-27-2012, 06:31 AM   #7
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321

Original Poster
Blog Entries: 1

Rep: Reputation: 31
TexMex,

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?
 
Old 01-27-2012, 06:44 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
xz is only available in recent kernels I think.
 
Old 01-27-2012, 02:03 PM   #9
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321

Original Poster
Blog Entries: 1

Rep: Reputation: 31
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 2.6.32.55.

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


Reply

Tags
grub, slow boot



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora9 now taking long time to boot terry-duell Fedora 7 12-10-2008 10:16 PM
SuSE 10.1 taking a long time to boot up adityavpratap SUSE / openSUSE 2 07-04-2006 06:51 AM
Why is Resolving taking so long? DevilDust Linux - Networking 11 08-08-2004 11:55 PM
Grub too long to boot rdoucet Mandriva 7 04-23-2004 02:09 AM
Why does Fedora takes long time to boot with Grub ckel Fedora - Installation 1 02-07-2004 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration