Okay... so I did something which I was probably not supposed to do. I have a 256 GB SSD. GParted from a live Kubuntu CD showed that I have 16gb of unallocated space. I wanted to add it to the root partition. However, there were swap and boot partitions between the unallocated space and the root partition, so I first added the space to boot partition, then shrunk the boot partition from left, then repeated the same with swap, and finally added it to root partition. To be safe, I reinstalled grub. Now, my Windows continues taking around 10s to boot, while Kubuntu takes more than a couple of minutes. Why is this so? If I did break something, why does it boot at all? Thanks a lot!
Ok, I think I figured out your problem; the system looks for the resume partition, which is the swap actually and was changed.
When you boot do you see a graphic screen? Press something to view messages. The delay is usually presented (waiting... something like that)
Try this: disable resume partition
Unless you need hibernation; in that case you need to find the new uuid of swap partition and correct
Also check the
/etc/fstab file. You should correct this one too, in order to have swap available to the system.
Found the solution!!
My swap space was in /dev/nvme0n1p6, so I ran:
sudo swapoff -a
sudo mkswap -L swap /dev/nvme0n1p6 and
sudo swapon -a.
Then I disabled some startup services, and finally commented out the swap line from /etc/fstab. Don't know whether
sudo sysctl vm.swappiness=10 helped or not, but after rebooting,
systemd-analyze showed 14.385s, as compared to around 2min 25s before.