# Boot really slow [ca 5min]

## Cruel

Hello guys. I have installed linux on my fujitsu siemens laptop. I have compiled the kernel on my own. 

Most things now work fine but the system boot is really slow. After pressing the return button on the grub 

bootloader it takes 5-6 minutes to load the complete systems and starting KDE.

On boot I see now errors. All works fine and in KDE it is (I think) normaly.

Maybe some of you have an idea what the problem could be...?

lspci output:

```

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)

00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)

00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)

00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)

01:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8600M GS] (rev a1)

04:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

06:00.0 Mass storage controller: Silicon Image, Inc. Sil 3531 [SATALink/SATARaid] Serial ATA Controller (rev 01)

07:04.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)

```

In the kernel configuration I have only activated the FireWire, my NVIDIA card. The rest is default (most).

Here my .conf from my kernel: http://pastebin.com/FUTfdP1u

----------

## chithanh

Possibly dmesg will tell you more. Sometimes the boot process can become slow due to missing firmware.

----------

## Abraxa

I suggest you let the kernel add timestamps to its output so you can check whether it's a kernel issue or something else. The kernel option is CONFIG_PRINTK_TIME and you can find it under "Kernel Hacking" -> "Show timing information on printks". After installing and a reboot you should see timestamps in dmesg which should let you figure things out a little more.

----------

## Cruel

 *chithanh wrote:*   

> Possibly dmesg will tell you more. Sometimes the boot process can become slow due to missing firmware.

 

Thanks. Here is the output. I see no problem there but maybe I'm wrong:

```

[   17.704099] cat used greatest stack depth: 6476 bytes left

[   18.954438] gzip used greatest stack depth: 5984 bytes left

[   20.460457] init-early.sh used greatest stack depth: 5792 bytes left

[   58.454492] udev[1201]: starting version 164

[   59.551581] iwlagn 0000:04:00.0: loaded firmware version 228.61.2.24

[   59.554376] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'

[   59.907071] uhci_hcd 0000:00:1d.0: reserve dev 2 ep81-INT, period 2, phase 1, 17 us

[   60.017703] uhci_hcd 0000:00:1d.0: release dev 2 ep81-INT, period 2, phase 1, 17 us

[   61.600898] nvidia: module license 'NVIDIA' taints kernel.

[   61.600903] Disabling lock debugging due to kernel taint

[   63.125502] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

[   63.125514] nvidia 0000:01:00.0: setting latency timer to 64

[   63.125521] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem

[   63.125668] NVRM: loading NVIDIA UNIX x86 Kernel Module  270.41.06  Mon Apr 18 14:54:25 PDT 2011

[   65.856060] EXT3-fs (sda5): using internal journal

[   66.018388] EXT3-fs: barriers not enabled

[   66.065342] kjournald starting.  Commit interval 5 seconds

[   66.066065] EXT3-fs (sda6): using internal journal

[   66.066069] EXT3-fs (sda6): mounted filesystem with writeback data mode

[   75.955233] Adding 1953120k swap on /dev/sda2.  Priority:-1 extents:1 across:1953120k 

[  102.206768] r8169 0000:05:00.0: eth0: link down

[  102.206969] ADDRCONF(NETDEV_UP): eth0: link is not ready

[  103.954376] ADDRCONF(NETDEV_UP): wlan0: link is not ready

[  136.646093] uhci_hcd 0000:00:1d.0: reserve dev 2 ep81-INT, period 2, phase 1, 17 us

[  204.122061] CE: hpet increased min_delta_ns to 20113 nsec

[  258.832773] hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

```

 *Abraxa wrote:*   

> I suggest you let the kernel add timestamps to its output so you can check whether it's a kernel issue or something else. The kernel option is CONFIG_PRINTK_TIME and you can find it under "Kernel Hacking" -> "Show timing information on printks". After installing and a reboot you should see timestamps in dmesg which should let you figure things out a little more.

 

Thanks for the answer. dmesg show me the time, too  :Smile: 

Edit

Well. Found some crap in the Xorg log. Maybe that makes the boot slow? I have currently the problem that kde does not start but shows me a black screen with only a cursor...

Here is the complete log: http://pastebin.com/mVfQaQbB

----------

## bastibasti

did you check cpufreq? if p4-clockmod is active, the system can get veeerrryyy slow

----------

## Cruel

 *bastibasti wrote:*   

> did you check cpufreq? if p4-clockmod is active, the system can get veeerrryyy slow

 

Thanks for your answer. 

cpufreq is 1000 Hz. Is think this is the best for a desktop environment. p4-clockmod is a modul right?

Because can't find it in the kernel config...

I noticed additionally that the logical boot are really fast. But on the first mount at /proc it begins to get slow.

And I have installed the kde-meta package. It tooks over 10 hours to install it?

That can't be normal or?

Thanks

----------

## DirtyHairy

Dunno about your boot problem, but the merge time for kde-meta is completely normal, KDE is a huge beast  :Smile: 

----------

## Goverp

I wonder if you have a corrupt disk attached somewhere.  I noticed my desktop machine taking ages to boot when I had a USB stick full of photos from my camera plugged in; turned out the stick's VFAT file system was broken.  I would have expected loads of error messages, but nothing appeared.  May be it wasn't so much broken as just full of long chains of bad blocks or something like that that happens with USB sticks (of which I know next to nothing  :Smile:  ).

----------

## Cruel

 *Goverp wrote:*   

> I wonder if you have a corrupt disk attached somewhere.  I noticed my desktop machine taking ages to boot when I had a USB stick full of photos from my camera plugged in; turned out the stick's VFAT file system was broken.  I would have expected loads of error messages, but nothing appeared.  May be it wasn't so much broken as just full of long chains of bad blocks or something like that that happens with USB sticks (of which I know next to nothing  ).

 

No. I have nothing in the USB ports of my laptop. That's really weird... I have no idea more...

----------

## paziu

hi, did you try to boot off a minimal gentoo boot cd? or any other livecd such as PartedMagic?

did your system slowed down after customizing the kernel?

if the system is also slow on a livecd, than a bios update might solve such problem... or it's an other hardware related issue....

otherwise,

I would suggest to look into the bios power saving features, disable if set,

if the system boots fine off a livecd I would go back into the kernel configuration and make sure you do not have anything like math emulation or cpu frequency scaling enabled, look into power management in the kernel... 

disable anything that does not apply to the architecture / cpu type, remove PATA support if your hdd is SATA.... check for SATA mode in the BIOS ( sometimes it might be set to "compatible" mode on some laptops )

make a backup of the existing configuration before changes....  add the new kernel to grub.conf, do not overwrite the current one since you might not be able to boot at all....

if the kernel config changes do not do any good try to apply the default config for your architecture - most likely you are running on a core2 family cpu so 64bit... recompile and try again...

it might be a number of things... even the kernel release itself... try a different stable release, even if it is older ( but not 3 years old )

http://packages.gentoo.org/package/sys-kernel/gentoo-sources

good luck!

----------

## Cruel

 *paziu wrote:*   

> hi, did you try to boot off a minimal gentoo boot cd? or any other livecd such as PartedMagic?
> 
> did your system slowed down after customizing the kernel?
> 
> if the system is also slow on a livecd, than a bios update might solve such problem... or it's an other hardware related issue....
> ...

 

Thank you for your answer. I have today emerged a genkernel and just tryed it with that kernel. The boot was then really fast. So the slow boot has something to do with 

the kernel!

I will try your suggestions maybe that can fix my problem.

----------

