Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 12.04 64bit installed on a WD Velociraptor (10.000 rpm) hard disk. I'm not using Wubi, it's a clear install.

I think that "adding swap" procedure on boot takes too long. At first I thought that it has something to do with the swap mounting, but as you can see, I've spotted the problem in the "ureadahead" deamon.

You can see below dmesg partial output:

[    5.347709] Console: switching to colour frame buffer device 210x65
[    5.351756] fb0: VESA VGA frame buffer device
[    5.613411] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   21.421858] Adding 1227772k swap on /dev/sda5.  Priority:-1 extents:1 across:1227772k 
[   21.425834] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   21.425841] ADDRCONF(NETDEV_UP): eth1: link is not ready

Complete dmesg output

Taking into account my hard drive's speed, this delay is not normal.

After upgrading to the latest kernel (3.2.0.36 from 3.2.0.35) or after removing "/var/lib/ureadahead/pack" file, the problem is temporary solved, just for one boot.
After the second boot the problem returns.

This is the dmesg output when everything works perfect:

[    5.120096] Console: switching to colour frame buffer device 210x65
[    5.124150] fb0: VESA VGA frame buffer device
[    5.285586] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[    6.953086] Adding 1227772k swap on /dev/sda5.  Priority:-1 extents:1 across:1227772k 
[    7.516909] ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.516916] ADDRCONF(NETDEV_UP): eth1: link is not ready

Complete dmesg output

As suggested in the comments I've tried to disable the swap mounting and the delay was moved to the next process, so it seems that it has nothing to do with swap mounting:
dmesg output:

[ 5.862973] EXT4-fs (sda3): recovery complete 
[ 5.887252] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null) 
[ 17.589428] ADDRCONF(NETDEV_UP): eth0: link is not ready 
[ 17.589435] ADDRCONF(NETDEV_UP): eth1: link is not ready

@gertvdijk noticed that in the latest dmesg output my system recovered from something, but this just happened just when I've comment out the swap from "/etc/fstab".

I've spoted the problem
Ureadahead slows down the boot process. This is weird since the opposite should happen!
Below I'm posting bootchart images and dmesg output of three different boots:

  1. Without ureadahead (disabled following this guide) there is no delay:
    dmesg output (ureadahead disabled)
    bootchart output (ureadahead disabled)
  2. With ureadahead enabled first boot (pack file is build for the first time) no delay:
    dmesg output (ureadahead enabled)
    bootchart output (ureadahead disabled)

  3. With ureadahead enabled second boot (ureadahead full working) delay is back:
    dmesg output (ureadahead enabled second boot)
    bootchart output (ureadahead disabled second boot)

NOTE
My question seems to be a duplicate of this Very slow boot due to mounting filesytem which concerns Ubuntu 11.04 and has no solution yet! If any admin reading this, I don't know if I have to delete my question as a duplicate since the problem doesn't seems to be the swap mounting... if so, delete it, or please, inform me to do so!

share|improve this question
    
Have you tried disabling swap for the time being to exclude all other causes? Just comment (prepend with #) the line for swap in /etc/fstab and reboot. –  gertvdijk Jan 18 '13 at 1:07
    
Thank you for your interest!<br/>I've just tried it.. I no more have this issue but again booting takes more time than normal delaying on the next line "ADDRCONF(NETDEV_UP): eth0: link is not ready"! dmesg output: [ 5.862973] EXT4-fs (sda3): recovery complete [ 5.887252] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null) [ 17.589428] ADDRCONF(NETDEV_UP): eth0: link is not ready [ 17.589435] ADDRCONF(NETDEV_UP): eth1: link is not ready –  naskoos Jan 18 '13 at 9:16
    
Then it's not loading of swap being the cause. I see recovery complete in your logs, indicating that you haven't shut down your system properly. I feel there's a lot more going on... like... are you using Wubi for example? –  gertvdijk Jan 18 '13 at 9:23
    
If you look above the output of the dmesg in the first update of my question, 17.589428 is not normal time for ADDRCONF! Sorry for the mess in my comments but how can I add a line break when writing a comment? –  naskoos Jan 18 '13 at 9:26
    
No I'm not using Wubi! It's a clear install! –  naskoos Jan 18 '13 at 9:27
show 6 more comments

2 Answers

Do a clean install of Ubuntu 13.10, it is the latest updated Ubuntu version. Your problems might be fixed under that version, updates always fix problems.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.