PDA

View Full Version : Troubleshooting long boot time



glennzo
22nd September 2017, 10:32 AM
On a desktop machine, Fedora 26 LXDE. Historically Fedora / LXDE has had very fast boot times for me on this machine. 10 seconds to the login prompt.

Lately, and most recently this morning, 50-60 seconds. While that isn't an eternity I've wondered what happened to cause the increase in boot time.

I did notice, watching the text boot, that it appears to have something to do with VirtualBox. VirtualBox is installed for this OS. Using my minimal skills with journalctl I squeezed the following from the last boot:


Sep 22 08:17:04 lxde26 vboxdrv.sh[765]: vboxdrv.sh: Starting VirtualBox services.
Sep 22 08:17:04 lxde26 vboxdrv.sh[806]: Starting VirtualBox services.
Sep 22 08:17:04 lxde26 vboxdrv.sh[765]: vboxdrv.sh: Building VirtualBox kernel modules.
Sep 22 08:17:04 lxde26 vboxdrv.sh[816]: Building VirtualBox kernel modules.
Sep 22 08:17:04 lxde26 audit[817]: AVC avc: denied { create } for pid=817 comm="vboxdrv.sh" name="vbox-install.log" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0
Sep 22 04:17:47 lxde26 vboxdrv.sh[7371]: VirtualBox kernel modules built.
Sep 22 04:17:47 lxde26 kernel: vboxdrv: loading out-of-tree module taints kernel.
Sep 22 04:17:47 lxde26 kernel: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
Sep 22 04:17:47 lxde26 kernel: vboxdrv: Found 6 processor cores
Sep 22 04:17:47 lxde26 kernel: vboxdrv: TSC mode is Invariant, tentative frequency 3792871533 Hz
Sep 22 04:17:47 lxde26 kernel: vboxdrv: Successfully loaded version 5.1.28 (interface 0x002a0000)
Sep 22 04:17:47 lxde26 kernel: VBoxNetFlt: Successfully started.
Sep 22 04:17:47 lxde26 kernel: VBoxNetAdp: Successfully started.
Sep 22 04:17:47 lxde26 kernel: VBoxPciLinuxInit
Sep 22 04:17:47 lxde26 kernel: vboxpci: IOMMU not found (not registered)
Sep 22 04:17:47 lxde26 vboxdrv.sh[7392]: VirtualBox services started.
Sep 22 04:17:47 lxde26 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxdrv comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 22 04:17:47 lxde26 systemd[1]: Starting vboxweb-service.service...
Sep 22 04:17:47 lxde26 systemd[1]: Starting vboxautostart-service.service...
Sep 22 04:17:47 lxde26 systemd[1]: Starting vboxballoonctrl-service.service...
Sep 22 04:17:47 lxde26 systemd[1]: Started vboxballoonctrl-service.service.
Sep 22 04:17:47 lxde26 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxballoonctrl-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 22 04:17:47 lxde26 systemd[1]: Started vboxautostart-service.service.
Sep 22 04:17:47 lxde26 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxautostart-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Sep 22 04:17:47 lxde26 systemd[1]: Started vboxweb-service.service.
Sep 22 04:17:47 lxde26 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vboxweb-service comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


Yes, it starts with Sep 22 08: and then changes to Sep 22 04: You'll notice that there is a 43 second delay 8:17:04 / 4:17:47. There is an SELinux denial at that time which could be the problem, or could it be something to do with getting date/time? Maybe building the VirtualBox kernel modules?

Any thoughts?

Candleflame
22nd September 2017, 10:53 AM
have you editd your grub file?

can you post your grub file? (/etc/default)

glennzo
22nd September 2017, 11:02 AM
have you editd your grub file?
No, but grub-customizer has. Not under this LXDE install but under Fedora 26/KDE on another partition.



can you post your grub file? (/etc/default)

grub.cfg from KDE (KDE controls the boot menu)

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 e22de80e-86d5-4dad-88cf-ddcd235c05f0
else
search --no-floppy --fs-uuid --set=root e22de80e-86d5-4dad-88cf-ddcd235c05f0
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=800x600
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 e22de80e-86d5-4dad-88cf-ddcd235c05f0
else
search --no-floppy --fs-uuid --set=root e22de80e-86d5-4dad-88cf-ddcd235c05f0
fi
insmod jpeg
background_image -m stretch /boot/grub2/themes/fedora_wall6_fixed.jpg
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=20
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=20
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
source ${prefix}/user.cfg
if [ -n "${GRUB2_PASSWORD}" ]; then
set superusers="root"
export superusers
password_pbkdf2 root ${GRUB2_PASSWORD}
fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/02_grub-customizer_menu_color_helper ###
set color_normal=white/black
set color_highlight=white/red
### END /etc/grub.d/02_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux_proxy ###




### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/40_custom_proxy ###
menuentry "Fedora 26 KDE (on /dev/sdb1)" --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-e22de80e-86d5-4dad-88cf-ddcd235c05f0' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 e22de80e-86d5-4dad-88cf-ddcd235c05f0
else
search --no-floppy --fs-uuid --set=root e22de80e-86d5-4dad-88cf-ddcd235c05f0
fi
linux16 /boot/vmlinuz-4.12.13-300.fc26.x86_64 root=UUID=e22de80e-86d5-4dad-88cf-ddcd235c05f0 ro
initrd16 /boot/initramfs-4.12.13-300.fc26.x86_64.img
}
### END /etc/grub.d/40_custom_proxy ###

### BEGIN /etc/grub.d/41_linux_xen ###

### END /etc/grub.d/41_linux_xen ###

### BEGIN /etc/grub.d/42_ppc_terminfo ###
### END /etc/grub.d/42_ppc_terminfo ###

### BEGIN /etc/grub.d/43_custom_proxy ###
menuentry "Fedora 26 LXDE (on /dev/sda1)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.11.11-300.fc26.x86_64--9292ea4a-782b-4447-997d-f42954893698' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9292ea4a-782b-4447-997d-f42954893698
else
search --no-floppy --fs-uuid --set=root 9292ea4a-782b-4447-997d-f42954893698
fi
linux16 /boot/vmlinuz-4.12.13-300.fc26.x86_64 root=/dev/sda1
initrd16 /boot/initramfs-4.12.13-300.fc26.x86_64.img
}
menuentry "Linux Mint 18.1 Serena (18.1) (on /dev/sda2)" --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-24ab6071-96ef-4df0-b9c5-ac81f8eeca2e' {
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 24ab6071-96ef-4df0-b9c5-ac81f8eeca2e
else
search --no-floppy --fs-uuid --set=root 24ab6071-96ef-4df0-b9c5-ac81f8eeca2e
fi
linux16 /boot/vmlinuz-4.4.0-53-generic root=UUID=24ab6071-96ef-4df0-b9c5-ac81f8eeca2e ro quiet splash $vt_handoff
initrd16 /boot/initrd.img-4.4.0-53-generic
}
### END /etc/grub.d/43_custom_proxy ###

### BEGIN /etc/grub.d/44_custom_proxy ###
menuentry "Fedora 25 LXDE (on /dev/sda3)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.9-200.fc25.x86_64--9489d172-e0d5-4220-a7f2-dd7c34904b42' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 9489d172-e0d5-4220-a7f2-dd7c34904b42
else
search --no-floppy --fs-uuid --set=root 9489d172-e0d5-4220-a7f2-dd7c34904b42
fi
linux16 /boot/vmlinuz-4.12.11-200.fc25.x86_64 root=/dev/sda3
initrd16 /boot/initramfs-4.12.11-200.fc25.x86_64.img
}
menuentry "Lubuntu 17.04 (17.04) (on /dev/sda5)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-861407b5-3465-4b4a-bfdb-1399b3d912b7' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 861407b5-3465-4b4a-bfdb-1399b3d912b7
else
search --no-floppy --fs-uuid --set=root 861407b5-3465-4b4a-bfdb-1399b3d912b7
fi
linux16 /boot/vmlinuz-4.10.0-33-generic root=UUID=861407b5-3465-4b4a-bfdb-1399b3d912b7 ro quiet splash $vt_handoff
initrd16 /boot/initrd.img-4.10.0-33-generic
}
### END /etc/grub.d/44_custom_proxy ###

### BEGIN /etc/grub.d/45_os-prober_proxy ###
menuentry "Debian GNU/Linux 9 (stretch) (on /dev/sda6)" --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-104f70d2-5d27-4853-85b6-21539cdd6aa2' {
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 104f70d2-5d27-4853-85b6-21539cdd6aa2
else
search --no-floppy --fs-uuid --set=root 104f70d2-5d27-4853-85b6-21539cdd6aa2
fi
linux16 /boot/vmlinuz-4.9.0-3-amd64 root=/dev/sda6
initrd16 /boot/initrd.img-4.9.0-3-amd64
}
menuentry "Manjaro Linux (17.0.2) (on /dev/sda7)" --class manjarolinux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-3c8874a7-86d3-463c-a21b-00ca84c4cc5e' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 3c8874a7-86d3-463c-a21b-00ca84c4cc5e
else
search --no-floppy --fs-uuid --set=root 3c8874a7-86d3-463c-a21b-00ca84c4cc5e
fi
linux16 /boot/vmlinuz-4.9-x86_64 root=/dev/sda7
initrd16 /boot/initramfs-4.9-x86_64.img
}
### END /etc/grub.d/45_os-prober_proxy ###

### BEGIN /etc/grub.d/46_custom_proxy ###
menuentry "Fedora 26 Workstation (on /dev/sdb2)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.11.10-300.fc26.x86_64--e1b480e6-07a6-4aae-a378-8f7a8e982ccd' {
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 e1b480e6-07a6-4aae-a378-8f7a8e982ccd
else
search --no-floppy --fs-uuid --set=root e1b480e6-07a6-4aae-a378-8f7a8e982ccd
fi
linux16 /boot/vmlinuz-4.12.13-300.fc26.x86_64 root=/dev/sdb2
initrd16 /boot/initramfs-4.12.13-300.fc26.x86_64.img
}
menuentry "Fedora 26 Cinnamon (on /dev/sdb3)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.11.8-300.fc26.x86_64--24758d02-5f8f-49c7-ad26-ad002283f0f8' {
insmod part_msdos
insmod ext2
set root='hd1,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos3 --hint-efi=hd1,msdos3 --hint-baremetal=ahci1,msdos3 24758d02-5f8f-49c7-ad26-ad002283f0f8
else
search --no-floppy --fs-uuid --set=root 24758d02-5f8f-49c7-ad26-ad002283f0f8
fi
linux16 /boot/vmlinuz-4.12.13-300.fc26.x86_64 root=/dev/sdb3
initrd16 /boot/initramfs-4.12.13-300.fc26.x86_64.img
}
menuentry "Voyager Linux (on /dev/sdb8)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.0-93-generic--bcb3e25f-afdb-4b7a-8df7-71144f670e7a' {
insmod part_msdos
insmod ext2
set root='hd1,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 bcb3e25f-afdb-4b7a-8df7-71144f670e7a
else
search --no-floppy --fs-uuid --set=root bcb3e25f-afdb-4b7a-8df7-71144f670e7a
fi
linux16 /boot/vmlinuz-4.4.0-93-generic root=UUID=bcb3e25f-afdb-4b7a-8df7-71144f670e7a ro quiet splash $vt_handoff
initrd16 /boot/initrd.img-4.4.0-93-generic
}
### END /etc/grub.d/46_custom_proxy ###

### BEGIN /etc/grub.d/47_os-prober_proxy ###































### END /etc/grub.d/47_os-prober_proxy ###

### BEGIN /etc/grub.d/48_custom_proxy ###
menuentry "CentOS 7 (on /dev/sdb9)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.10.0-693.2.2.el7.x86_64--814855af-4e80-4160-aff2-9a0e40ac1a1b' {
insmod part_msdos
insmod ext2
set root='hd1,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos9 --hint-efi=hd1,msdos9 --hint-baremetal=ahci1,msdos9 814855af-4e80-4160-aff2-9a0e40ac1a1b
else
search --no-floppy --fs-uuid --set=root 814855af-4e80-4160-aff2-9a0e40ac1a1b
fi
linux16 /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64 root=/dev/sdb9
initrd16 /boot/initramfs-3.10.0-693.2.2.el7.x86_64.img
}
### END /etc/grub.d/48_custom_proxy ###

### BEGIN /etc/grub.d/51_custom_proxy ###

# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.














### END /etc/grub.d/51_custom_proxy ###

### BEGIN /etc/grub.d/52_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/52_custom ###


Is that what you mean?