Ubuntu 18.04.1 takes too long to boot after upgrading kernel through Ukuu

Hi everyone,

I have recently installed Ubuntu 18.04.1 on a T430 and decided to upgrade to the latest Linux kernel with the ukuu tool. I am now on kernel version 4.17.11 and everything seems to work fine, except that the boot times are awful. It takes around 10-15 minutes to boot up. I’m trying to understand what is causing the boot delays but I can’t find a root cause. I was hoping someone with more Ubuntu experience could guide me on how to analyze this problem.

What have you done to start?

It sounds like a non-critical service is failing to start on boot and systemd is waiting for it to time out. I would look through your systems services and check to see if something has failed before anything else.

@SgtAwesomesauce

I’m not sure wether this is the correct way or not, but it I run systemctl list-units --state=failed, I get the following:

$ systemctl list-units --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● ureadahead.service loaded failed failed Read required files in advance

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use ‘systemctl list-unit-files’.

1 Like

That is one of the correct ways to list failed services.

Ureadahead shouldn’t be causing such a problem though. I’m away from my pc at the moment, but you might look at both all services, to see if there are any others that have some odd status, or investigate Ureadahead more deeply. It’s possible you don’t have it installed, since that’s the first thing that popped up when I searched the issue from my mobile.

you could also query systemd to see who takes the longest time:

systemd-analyze blame

See which service taking the longest time to start

4 Likes

I couldn’t find any delaying jobs nor disabling the ureadahead service from startup solved the problem. There is something else out there that is causing the delays.

What @Asgaroth said should show you what’s causing the delay. If not, press esc at boot splash to see where it hangs.

1 Like

running dmesg will list what hangs, the first 2 seconds is a lot of the base stuff and after that look for your jump of ~1000 seconds

2.03840 loading things
3.23432 more things
6.23423 networking up
22342.23420 drive no there? i long time wait
22343.23414 really not there, okay time to login

2 Likes

Is there a specific reason why you needed to upgrade to the newer 4.17 kernels?
Because if you dont really have a need for running those newer kernels.
Then rolling back to the 4.15.0-23 kernel would be a solution to the problem most likelly.
The 4.17 kernels in Ubuntu are still sorta kinda experimental and might contain serious bugs.

Allthough i do understand that my imput isnt really helping finding the root cause of the issue.

Remember that the new kernels are UNSIGNED so it won’t work with UEFI secure boot. Only the LTS kernels seem to be signed, and none of the new kernels are signed for secure boot.

There’s no reason to update the kernel unless you want performance regression optimizations for Meltdown or Spectre on Intel, or simple performance boosts on Ryzen.

I intended to do some gaming benchmarking with the newer kernels and compare it to the current stable one. I don’t think there will be much difference as I am running games on an Intel HD graphics GPU. I did try to boot with the stable kernel and the issue prevailed; could it be that ukuu installed something else that is breaking things up? like kernel modules.

Which LTS kernel do you have installed besides the 4.17 Kernel?
Because a while back Ubuntu rolled out a kernel update for the 4.15 series which was Kernel 4.15.0-24 and that particular kernel also had issues with very long boot times.
Ubuntu later pulled that particular kernel back because of a serious bug.
So you might double check which particular LTS kernel you have currentlly installed.
The 4.15.0-23 works fine.
But the 4.15.0-24 and the 4.15.0-26 have long boot time issues.
Or atleast they contain a bug related to it.

One of the downsides of Ukuu is that its basically a third party application to manage kernels.
But the application it self doesnt really provide much information on the said kernels.
Unlike Linux Mint which has a proper kernel management tool build in.

The LTS kernel I have is 4.15.0-29. I did a fresh install with the latest Ubuntu Desktop image, and pulled updates during installation, so my system should have not had the buggy kernels. I think I’m going to try a clean install again and not upgrade the kernel, unless I find an issue with the stable one.

Hmm yeah that newer kernel basically shouldnt have the bug anymore.
But atleast it might be worth trying to do a new clean install without kernel update.
I did get the said 4.15.0-29 kernel aswell in the update manager today.
But i have not installed that one either yet.
There seems to be some security updates to new kernel.

whats the full rundown of hardware here, and uefi/bios version?

the output of dmesg here would be good too?

Then dont update your kernel through Ukuu?
Simply follow the Ubuntu releases and you’re golden, the whole reasoning using ubuntu is that someone does the testing for you.
Basically what is happening is that you’re following a release schedule, then some random releaser says “hey i got this guys”, and ofc. fails at it, and then you wonder why random_kernel_05 doesn’t work.
Ubuntu has the best bleeding edge when it comes to debian, let them do their job.

Ubuntu shouldn’t be at more then 4.15.X-Y so you’re wayyy ahead of Ubuntu.

In this case, how do you deal with e.g. AMD Vega drivers 2200G or 2400G which are included in 4.17 (and not 4.15)?

Wendell, here are the things you are asking for:

-lspci
-dmesg
-UEFI v2.76

[edited] nevermind, fixed it.