1

I had Ubuntu 18.04.3 dual boot with Windows 10 (Windows is on 2nd drive) and never had a issue with slow booting time. After installing Kali Linux on the same drive where Ubuntu is installed, Ubuntu boot time increased about 1 min, before it was 10 or 20 sec. Below is the drive info on which both OS are installed

gparted screenshot

Kali Linux: /dev/sda3
Kali linux-swap: /dev/sda4
Ubuntu: /dev/sda6
Ubuntu linux-swap: /dev/sda5

What should I do to fix the boot time?

7
  • 4
    Kali linux probably formatted the swap partition, and your Ubuntu is looking (and waiting) for the old swap UUID to appear, before eventually timeout occurs & it gives up (thus slower boot). You need to change the UUID's for your old swap partition to match your new UUID. My 2c guess anyway.
    – guiverc
    Oct 17 '19 at 11:22
  • @guiverc slow boot issue is with ubuntu only not with other OS installed. Can you please tell me how to change UUID?
    – Askani
    Oct 17 '19 at 11:27
  • 1
    Windows won't use the swap so won't be impacted; since Kali formatted it, it knows the new UUID so it won't be impacted; only others will be impacted (thus Ubuntu). Use blkid to view your block devices ID's; then check what UUID's are listed in your file system table (/etc/fstab), eg. grep UUID /etc/fstab checking to see if the UUID= match what prior blkid showed. I suspect your swap will contain a UUID that you don't have, this needs to be changed. (ie. edit /etc/fstab in the Ubuntu partition). fyi: you need to elevate privileges to edit files in /etc.
    – guiverc
    Oct 17 '19 at 11:35
  • @guiverc blkid /dev/sda5: UUID="5dd061d5-d325-4bcc-83b2-fd1ed516e8cc" TYPE="swap", /dev/sda6: UUID="eadf1edf-19b3-4693-8551-6176e4bbed88" TYPE="ext4" , grep UUID /etc/fstab UUID=eadf1edf-19b3-4693-8551-6176e4bbed88 / ext4 errors=remount-ro 0 1, UUID=484A-BF6F /boot/efi vfat umask=0077 0 1, UUID=UUID=42a3362f-6945-43a2-8d36-ee195c856094 none swap sw 0 0 ..............so i should change UUID=UUID=42a3362f-6945-43a2-8d36-ee195c856094 with UUID=5dd061d5-d325-4bcc-83b2-fd1ed516e8cc
    – Askani
    Oct 17 '19 at 12:31
  • 1
    @guiverc you just have to write an answer ...
    – damadam
    Oct 17 '19 at 15:37
3

Kali linux probably formatted the swap partition, and your Ubuntu is looking (and waiting) for the old swap UUID to appear, before eventually timeout occurs & it gives up (thus slower boot).

You need to change the UUID's for your old swap partition to match your new UUID.

As windows doesn't use a "linux" swap partition, it's boot-up speed will be normal, it was Kali that made the change so it's aware of it - thus why Ubuntu only is slower.

Use blkid to view your block devices ID's; then check what UUID's are listed in your file system table (/etc/fstab), eg. grep UUID /etc/fstab checking to see if the UUID= match what prior blkid showed.

I suspect your swap will contain a UUID that you don't have, this needs to be changed. (ie. edit /etc/fstab in the Ubuntu partition). fyi: you need to elevate privileges to edit files in /etc.

You provided in comments

/dev/sda5: UUID="5dd061d5-d325-4bcc-83b2-fd1ed516e8cc" TYPE="swap"
/dev/sda6: UUID="eadf1edf-19b3-4693-8551-6176e4bbed88" TYPE="ext4" 

UUID=eadf1edf-19b3-4693-8551-6176e4bbed88 / ext4 errors=remount-ro 0 1
UUID=484A-BF6F /boot/efi vfat umask=0077 0 1
UUID=UUID=42a3362f-6945-43a2-8d36-ee195c856094 none swap sw 0 0

so you need to ensure "UUID=5dd061d5-d325-4bcc-83b2-fd1ed516e8cc" is in your Ubuntu /etc/fstab, ie. replace the "42a3362f-6945-43a2-8d36-ee195c856094" with "5dd061d5-d325-4bcc-83b2-fd1ed516e8cc"

Note: there is an extra "UUID=" in there, I'm assuming is a typo, as it shouldn't be there, ie. UUID=UUID= is invalid. Please edit your question in future and add additional information there, we can help format it in questions/answers

Also please note: One benefit of a swap partition is it can be used by any GNU/Linux, ie. Kali can use one created by Ubuntu and vice-versa. In fact nearly every Linux will use any swap partitions it finds which is why your 'Ubuntu' swap was re-formatted by Kali as it claimed 'ownership'. The benefit of this (I'm a dual booter to of two Ubuntu's) is my one swap partition in my case can be used by my Ubuntu 18.04 & my 19.10 (for you it'll be Ubuntu & Kali sharing); reducing disk space needed for 'swap'. If swapfiles were used, they wouldn't be sharing the space. The only drawback is it'll mean you can't hibernate one to use the other, but I don't do that (and I bet you're current setup may not allow for that anyway)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.