LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 08:53 AM   #1
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
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, 09:47 AM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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, 12:34 PM   #3
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,219

Rep: Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821Reputation: 821
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, 03:43 PM   #4
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Original Poster
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, 05:45 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

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

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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, 07:31 AM   #7
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 314
Blog Entries: 1

Original Poster
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, 07:44 AM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

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

Original Poster
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:16 PM
SuSE 10.1 taking a long time to boot up adityavpratap Suse/Novell 2 07-04-2006 07:51 AM
Why is Resolving taking so long? DevilDust Linux - Networking 11 08-09-2004 12:55 AM
Grub too long to boot rdoucet Mandriva 7 04-23-2004 03:09 AM
Why does Fedora takes long time to boot with Grub ckel Fedora - Installation 1 02-07-2004 04:33 PM


All times are GMT -5. The time now is 11:24 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration