Sunday, February 3, 2019

Delay in kernel startup when using btrfs

Delay in kernel startup when using btrfs

With btrfs on Asus T100TA I’ve hit very long delay during kernel startup. Like:

jhorak@t100 ~> systemd-analyze  
Startup finished in 2.075s (firmware) + 14.669s (loader) + 36.202s (kernel) + 13.748s (userspace) = 66.697s

The kernel is stuck on scanning for btrfs filesystems message.

The issue is best described there: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1460447

The scan is done because the kernel is looking for the hibernation file. In case you don’t want to use hibernation you can append resume= to the kernel parameters in /etc/default/grub to the GRUB_CMDLINE_LINUX_DEFAULT variable and update grub.cfg by:

sudo update-grub2

Then the next boot will be significantly faster:

jhorak@t100 /e/default> systemd-analyze 
Startup finished in 2.075s (firmware) + 14.669s (loader) + 6.202s (kernel) + 13.748s (userspace) = 36.697s

No comments: