You are not logged in.

#1 2012-12-21 14:26:53

Registered: 2012-12-21
Posts: 1

Boot time too long (about 2 minutes) (userspace)

i struggle on following problem: My Arch needs about 2 minutes to boot. (From password for encrypted LVM to login). I fixed this issue on an older installation, but forgot how i did it.

Laptop Lenovo ThinkPad Edge E330
Prozessor: i3
Ram: 4GB
HDD: 280GB
Kernel: 3.6.10-1-ARCH
encrypted LVM with boot partition and UEFI

Userspace needs very long to load, Kernel just needed so long, because i failed my password 2 times.:

Startup finished in 24328ms (kernel) + 92478ms (userspace) = 116806ms

systemd-analyze blame
  1959ms wicd.service
   856ms systemd-vconsole-setup.service
   666ms systemd-remount-fs.service
   589ms tmp.mount
   573ms dev-mqueue.mount
   526ms dev-hugepages.mount
   493ms sys-kernel-debug.mount
   427ms polkit.service
   356ms systemd-logind.service
   354ms systemd-tmpfiles-setup.service
    86ms udisks2.service
    78ms systemd-udevd.service
    65ms systemd-udev-trigger.service
    59ms systemd-sysctl.service
    56ms systemd-user-sessions.service
    53ms boot-efi.mount
    41ms rtkit-daemon.service
    18ms boot.mount
     1ms sys-fs-fuse-connections.mount

output: systemd-analyze plot

nano /etc/fstab
# /etc/fstab: static file system information
# <file system> <dir>   <type>  <options>       <dump>  <pass>
# UUID=c43f0e84-f844-4b00-8211-09a995d6ae44 LABEL=arch-root
/dev/mapper/arch_lvm-root       /               ext4            rw,defaults,noatime     0 1

# UUID=1c19703c-dae0-4f7f-9c77-77fef09e6919 LABEL=arch-boosystemd-analyzet
/dev/sda4               /boot           ext3            defaults,noatime,nodev,nosuid   0 2

# UUID=DEB9-3F83
/dev/sda1               /boot/efi       vfat            relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

# UUID=926f4195-15b9-411a-9e71-5ab49706a939 LABEL=arch-swap
/dev/dm-4               none            swap            sw      0 0

menuentry in/boot/grub/grub.cfg (GRUB2):

menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core r$
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  1c19703c-dae0-4f7f-9c77-77fef09e6919
          search --no-floppy --fs-uuid --set=root 1c19703c-dae0-4f7f-9c77-77fef09e6919
        echo    'Loading Linux core repo kernel ...'
        linux   /vmlinuz-linux root=/dev/mapper/arch_lvm-root ro root=/dev/mapper/arch_lvm-root cryptdevice=/dev/sda5:arch-luks resume=/dev/mapper/arch_lvm-swap quiet
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-linux.img
nano /etc/mkinitcpio.conf

MODULES="dm_mod ext4 vfat"


# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.

HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems fsck"

Anyone has an idea, where i can start looking for the cause of this long boot time?

At boot there is no mounting error, systemd-fsck prints: ok and everthing clean.

After mounting my laptop just does nothing, HDD makes no sounds. Does he wait for anything?
I tried to disable wicd.service and laptop-mode.service via systemctl disable. But it didnt change anything.
I tried to disable all partitions except  / in /etc/fstab, but this didn't change anything too.

Bootchart doesn't work for me, because it generates the graphic just after mounting the partitions (after about 33 sec.). After this the laptop just does nothing for 1 minute.

Last edited by mob3d (2012-12-21 19:39:09)


#2 2012-12-21 16:29:19

Registered: 2011-08-05
Posts: 41

Re: Boot time too long (about 2 minutes) (userspace)

To be honest i have been trying to fine tune my desktop to boot as quick as able, assuming and trying between compressed initram files to filesystem as well in form of btrfs.
Those of current considerations have been on where cpu could perhaps be able to get around with memory better than hard drive can output.

But as of own usage figuring has been from mkinitcpio.conf xz compression gives better results than default, but most superior is that of cat that is not compressed, in that of kernel initialization.

Filesystem and some additional hardware issues on by booting made some changes on by what filesystem is to be used and even with btrfs that of space_cache usage, that by claim of dmesg has lead into not able to utilize it from time to time.

My desktop has had an issue of not being able to use applications with multimedia interface of music/video/games and most recent attempt is to take down every alsa-store/restore.service there is (first boot (this) without it was successful), cause of having 2 sound cards in form of normal and television card one. (Old type fix from linuxtv was that of indexing those of card ones behind normal and order seems right, no clear yet if it causes issues to that of alsa/systemd abilities.)

Without supplying an image of my own boot as of having most basic loaded environment, it does go too quickly to have issue about it. That of most optimal for normal boot would be to use perhaps uncompressed initramfs (compressed only if using only failsafe (larger file)), to that of with kde/gnome3 btrfs and compression could perhaps get around with large amount of services loaded and desktop wallpapers of higher resolution size to any other in need quicker than using ext4 and normal way.

As of additional message i would like to add on how /boot/grub/grub.cfg might have an multiple time of part_gpt module being inserted as well, only one is needed but using grub-mkconfig -o /boot/grub/grub.cfg does add it 2 times even when from /etc/default/grub every part of part_gpt and part_msdos is taken away.


#3 2012-12-21 17:51:49

Registered: 2011-08-05
Posts: 41

Re: Boot time too long (about 2 minutes) (userspace)

As an own christmass gift i would add that system does boot by claim of systemd analyze plot image side of kernel under 3s and additional user environment 2.x-4.x S, in under 5 seconds of boot time, it includes that of finding and using usb 3g mobile device by simple service of Wants=dev-ttyUSB0/After=dev-ttyUSB0, that is not being told by simple reading of contents systemd does have, it loads when device node comes available, or even so magic does make it to happen. (Some of attempts to have network started without it (new addon that i was not aware of) has been failures at systemd time as that of boot time is too fast to allow kernel initialize all hardware and mount those to device spots.)


Board footer

Powered by FluxBB