Slow boot time

Not at my PC at the moment, but is there a tool I can use to see what programs/services/processes are slowing my boot times in Linux?
Have checked DMESG, and it goes though the usual steps, but stalls after polling all the drives and initiating the crng (?) but hangs for like 85seconds before mounting the root partition.
I have the grub partition on an older M.2, and one install on the same drive.
I installed another distributon on another SSD, but it’s no faster.
There isn’t any error, just the list of drives, then the crng thing, all by the 5 second mark, but then the next line is at 90 seconds, where it loads the ext4 or xfs partition and carries on it’s merry way.

I was hoping there might be some other log file I might check to see what it’s waiting for in between?

Pls halp L1T, You’re my only hope!
Edit: system specs-

Summary

Ryzen 1700x
X370 Taichi
GTX 980 for host
GTX 980ti for vim guests
M.2 Samsung xp941 (older x2 pcie)
— with win10, Ubuntu Mate and a grub/boot loader
Bunch of rust in a zpool
Bunch of flash in another zpool
Spare ssd (now fedora, and a separate /boot/efi for it
Spare ssd (installing Debian and new efi part)

Maybe this?

Thanks, will install rng-tools and try giving button mashing a go during the hang period.

Should have added that the first system installed was Ubuntu Mate, on an EXT4 partition with kernel 4.15(? A new one) and then installed Debian stretch (4.9) on XFS, in case it was a problem with the FS type.

I wasn’t sure if there was a better place to look than dmesg, like some /var/log/fu or something.

I is a proper noob

Well, that makes two of us. :stuck_out_tongue:

I was just trying to find out what crng is when I stumbled over that link. :rofl:

post your /etc/fstab file. It could help reveal if anything is being mounted in an un-optimized way.

Sorry, at work, but I had commented out the swap file, which may be an issue?

Will be trying systemd-analyse blame when I get home.

The only active lines in fstab are the efi/boot partition, by uuid, and the / part, also by uuid, and the commented out swap partition.

I hope you also properly turned swapoff and not just commented out the line in fstab.

What I was more or less interested in were the extra bits at the end. The numbers, which describe the type of mounting behavior.

Pretty sure I did, and when I set up the second distro on the other drive, did not set up a swap at all (although did not run swapoff after install. Will try that too)

yeah, give it a good swapoff -av

Okay, tried swapoff, no dice.
Relabelled the root partition in fstab in case the uuid was causing a problem.
Installed pybootchart, and it looked like systemd-udevd was being slow, but not sure.

Installed fedora on a separate drive, with it’s own /boot/efi partition, and it booted fast as butter.

Tried booting into Debian, using Fedoras boot partition, still slow. Same with the Ubuntu partition on the M.2 drive.

Good indication that some hardware is taking a while to load. Could either by a hard drive thats taking a while to mount or something as simple as a mouse

Try using command
systemd-analyze blame

I tried systemd-analyse blame, but it only seems to run after boot, not during, but thanks.

Haven’t tried unplugging hardware, will try that tonight