LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2020, 10:16 PM   #1
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Rep: Reputation: Disabled
Kali Linux installed in external HDD takes forever to boot


Hello there,

I have installed kali on my external HDD, it takes more than 2 mins to boot up, I have spent hours to find solutions but the main solution I found is the invalid UUID for swap which is not true in my case.
Is there anyone who can look at my system configurations and help me out with this? Slow boot time is killing :|
 
Old 06-12-2020, 06:57 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Looking at an unknown computer's configuration is such an open-ended task that nobody is going to do it. Especially for free.

Rather than that, find out where the computer spends time booting. I would start by looking at the kernel and services messages printed to the console. I would then learn about systemd-analyze (Archlinux has a great wiki: https://wiki.archlinux.org/index.php...e/Boot_process) and use it.

Since you have spent hours trying to analyze this, how about sharing your findings? Personally, I don't understand what you mean by invalid UUID for swap.

Last edited by berndbausch; 06-12-2020 at 07:00 PM. Reason: typos
 
Old 06-12-2020, 08:03 PM   #3
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Looking at an unknown computer's configuration is such an open-ended task that nobody is going to do it. Especially for free.

Rather than that, find out where the computer spends time booting. I would start by looking at the kernel and services messages printed to the console. I would then learn about systemd-analyze (Archlinux has a great wiki: https://wiki.archlinux.org/index.php...e/Boot_process) and use it.

Since you have spent hours trying to analyze this, how about sharing your findings? Personally, I don't understand what you mean by invalid UUID for swap.
Actually I read somewhere on the internet that, this slow boot problem arises when you have different UUID mentioned in /etc/fstab file for swap, but this is not the case with me. I am mentioning some of the outputs down, I hope they can help you trace the problem.

blkid:
/dev/sda1: LABEL="System Reserved" BLOCK_SIZE="512" UUID="743C0DD53C0D9372" TYPE="ntfs" PARTUUID="ca074851-01"
/dev/sda2: LABEL="Operating System" BLOCK_SIZE="512" UUID="165299E95299CE3D" TYPE="ntfs" PARTUUID="ca074851-02"
/dev/sda3: LABEL="Files" BLOCK_SIZE="512" UUID="C6F4EDD8F4EDCAAF" TYPE="ntfs" PARTUUID="ca074851-03"
/dev/sda5: TYPE="BitLocker" PARTUUID="ca074851-05"
/dev/sdb1: UUID="832ebaee-6909-4f7d-a038-108b53d70bb9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="904c5681-01"
/dev/sdb5: UUID="c0e8bbb2-c4d9-4211-bc3a-59d9ec91d8d6" TYPE="swap" PARTUUID="904c5681-05"

cat /etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdc1 during installation
UUID=832ebaee-6909-4f7d-a038-108b53d70bb9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdc5 during installation
UUID=c0e8bbb2-c4d9-4211-bc3a-59d9ec91d8d6 none swap sw 0 0


systemd-analyze:
Startup finished in 11.333s (kernel) + 2min 4.834s (userspace) = 2min 16.168s
graphical.target reached after 2min 4.799s in userspace


You can see in the output of systemd-analyze, that my OS is taking up more than 2 mins to load, which is pretty abnormal
 
Old 06-12-2020, 08:34 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The information you provide doesn't permit to see a problem in fstab.
 
Old 06-12-2020, 09:07 PM   #5
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
The information you provide doesn't permit to see a problem in fstab.
Yes, so what could be the problem? The system should boot up in seconds instead of minutes. I have used bleachbit to clean up all the junk from OS but it also didnt help
 
Old 06-12-2020, 10:19 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Find out where the computer spends time booting. I would start by looking at the kernel and services messages printed to the console. I would then learn about systemd-analyze (Archlinux has a great wiki: https://wiki.archlinux.org/index.php...e/Boot_process) and use it.

Since you have spent hours trying to analyze this, how about sharing your findings?
 
Old 06-12-2020, 10:30 PM   #7
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Find out where the computer spends time booting. I would start by looking at the kernel and services messages printed to the console. I would then learn about systemd-analyze (Archlinux has a great wiki: https://wiki.archlinux.org/index.php...e/Boot_process) and use it.

Since you have spent hours trying to analyze this, how about sharing your findings?
systemd-analyze blame
1min 28.901s plymouth-quit-wait.service >
1min 6.944s docker.service >
49.322s thin.service >
24.411s vmware.service >
22.002s vmware-USBArbitrator.service >
17.866s systemd-journal-flush.service >
15.925s dev-sdb1.device >
14.575s networking.service >
14.553s NetworkManager-wait-online.service >
14.124s user@130.service >
13.747s accounts-daemon.service >
12.006s ModemManager.service >
9.738s polkit.service >
9.622s NetworkManager.service >
9.146s udisks2.service >
8.552s iio-sensor-proxy.service >
8.391s systemd-logind.service >
7.472s fwupd-refresh.service >
6.182s systemd-udevd.service >
6.057s gdm.service >
5.805s smartmontools.service >
5.205s systemd-tmpfiles-clean.service >
4.247s virtualbox.service >
lines 1-23...skipping...
1min 28.901s plymouth-quit-wait.service
1min 6.944s docker.service
49.322s thin.service
24.411s vmware.service
22.002s vmware-USBArbitrator.service
17.866s systemd-journal-flush.service
15.925s dev-sdb1.device
14.575s networking.service
14.553s NetworkManager-wait-online.service
14.124s user@130.service
13.747s accounts-daemon.service
12.006s ModemManager.service
9.738s polkit.service
9.622s NetworkManager.service
9.146s udisks2.service
8.552s iio-sensor-proxy.service
8.391s systemd-logind.service
7.472s fwupd-refresh.service
6.182s systemd-udevd.service
6.057s gdm.service
5.805s smartmontools.service
5.205s systemd-tmpfiles-clean.service
4.247s virtualbox.service
3.746s upower.service
3.425s wpa_supplicant.service
3.409s rsyslog.service
2.850s preload.service
2.437s stunnel4.service
1.342s systemd-backlight@backlight:intel_backlight.service
1.303s binfmt-support.service
1.053s user-runtime-dir@130.service
1.013s systemd-tmpfiles-setup.service
1.013s systemd-tmpfiles-setup.service
974ms pppd-dns.service
928ms systemd-tmpfiles-setup-dev.service
862ms systemd-random-seed.service
758ms systemd-journald.service
738ms plymouth-read-write.service
732ms run-rpc_pipefs.mount
727ms containerd.service
673ms systemd-udev-trigger.service
663ms systemd-sysusers.service
645ms plymouth-start.service
621ms systemd-sysctl.service
353ms user@1000.service
325ms dev-disk-by\x2duuid-c0e8bbb2\x2dc4d9\x2d4211\x2dbc3a\x2d59d9ec91d8d6.swap
300ms console-setup.service
297ms keyboard-setup.service
286ms ifupdown-pre.service
233ms dev-hugepages.mount
231ms dev-mqueue.mount
229ms sys-kernel-debug.mount
228ms sys-kernel-tracing.mount
227ms kmod-static-nodes.service
200ms colord.service
187ms systemd-user-sessions.service
167ms systemd-remount-fs.service
150ms systemd-modules-load.service
144ms nfs-config.service
122ms proc-sys-fs-binfmt_misc.mount
81ms systemd-update-utmp.service
56ms systemd-rfkill.service
24ms systemd-update-utmp-runlevel.service
14ms user-runtime-dir@1000.service
7ms rtkit-daemon.service
2ms sys-fs-fuse-connections.mount
2ms docker.socket

systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @2min 4.799s
└─multi-user.target @2min 4.799s
└─plymouth-quit-wait.service @35.896s +1min 28.901s
└─systemd-user-sessions.service @35.704s +187ms
└─network.target @35.695s
└─wpa_supplicant.service @44.838s +3.425s
└─dbus.service @26.064s
└─basic.target @26.025s
└─sockets.target @26.025s
└─docker.socket @26.022s +2ms
└─sysinit.target @25.867s
└─sys-fs-fuse-connections.mount @1min 8.188s +2ms
└─systemd-modules-load.service @6.216s +150ms
└─systemd-journald.socket @5.984s
└─system.slice @5.977s
└─-.slice @5.977s
Some outputs to commands mentioned in the link you shared, hope it helps. Let me know if there is anything else you need to figure out the issue

As far as my findings are concerned, so I first saw that UUID problem available as a solution on internet, I dug deeper to find if late bootup is caused by some other issue but didnt find anything helpful that's why I considered joining a forum and asking experts as I have to bootup my HDD several times in a day and this 2 min start up really multiplies if I consider it as a whole. I shall be thankful if you can help to overcome this issue.

Last edited by najum98; 06-12-2020 at 10:35 PM.
 
Old 06-12-2020, 10:37 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
What about hardware?

What are the computer specifications?

Is the HDD mechanical or solid state?

USB 2 or 3?
 
Old 06-12-2020, 10:47 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Once booted run this.
Code:
cat /proc/cmdline
 
Old 06-12-2020, 10:51 PM   #10
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
What about hardware?

What are the computer specifications?

Is the HDD mechanical or solid state?

USB 2 or 3?
Its i5 8gb ram, HDD is mechanical and usb is 3
 
Old 06-12-2020, 10:52 PM   #11
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Once booted run this.
Code:
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.6.0-kali2-amd64 root=UUID=832ebaee-6909-4f7d-a038-108b53d70bb9 ro initrd=/install/gtk/initrd.gz quiet splash
 
Old 06-12-2020, 11:07 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Sorry, can't help. I thought maybe you had a resume keyword that also takes the swap UUID, and that was wrong.
 
Old 06-12-2020, 11:18 PM   #13
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You have a hitparade of the services that take longest. This is where you should start. Note that you should not just add up the times, since they are partially launched in parallel Disable or uninstall services you don't need.

I would:

Remove splash from the Linux command line. That should take care of the Plymouth service, but perhaps you need to disable it, too.
Also remove quiet, to see console messages and determine what other things block the computer.
Find out why Docker and Vmware spend so much time. Or disable them.

No idea what thin.service is, but I'd check it and see what can be done there.

And again, you may have an initialization step that takes a long time. You can see it by watching the console messages.

Last edited by berndbausch; 06-12-2020 at 11:23 PM.
 
1 members found this post helpful.
Old 06-12-2020, 11:40 PM   #14
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
You have a hitparade of the services that take longest. This is where you should start. Note that you should not just add up the times, since they are partially launched in parallel Disable or uninstall services you don't need.

I would:

Remove splash from the Linux command line. That should take care of the Plymouth service, but perhaps you need to disable it, too.
Also remove quiet, to see console messages and determine what other things block the computer.
Find out why Docker and Vmware spend so much time. Or disable them.

No idea what thin.service is, but I'd check it and see what can be done there.

And again, you may have an initialization step that takes a long time. You can see it by watching the console messages.
I have disabled thin.service,plymouth service, all vmware,virtualbox and docker services using systemctl.
I have removed quiet from /etc/default/grub file and now I can see slight improvement in the boot time.
systemd.analyze
Startup finished in 11.434s (kernel) + 1min 32.326s (userspace) = 1min 43.761s
graphical.target reached after 1min 32.286s in userspace

I have noticed something, that instead that I disabled them, plymouth service is still visible in systemd-analyze blame list could it be due to other plymouth services like plymouth-start.service? should I disable all tagged plymouth?, also vmware-USBArbitrator.service is still there, I have also tried systemctl stop on vmware one but I dont know its still working

Plus, as I have disabled splash so I saw that after "started Gnome Display Manager", it hung up and took some time to proceed

Last edited by najum98; 06-12-2020 at 11:59 PM.
 
Old 06-12-2020, 11:44 PM   #15
najum98
LQ Newbie
 
Registered: Jun 2020
Distribution: Ubuntu
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by syg00 View Post
Sorry, can't help. I thought maybe you had a resume keyword that also takes the swap UUID, and that was wrong.
No problem bud, Thanks for your time
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Import my times from POL TrackMania Nations Forever to Snap TrackMania Nations Forever? linustalman Linux - Games 1 09-03-2018 06:47 AM
Failed to fetch http://http.kali.org/kali/dists/kali/Release.gpg aymeric75 Linux - General 2 07-11-2015 05:10 AM
valid_lft forever preferred_lft forever sulekha Linux - Networking 1 01-10-2013 09:13 AM
Benchmarking a tape drive, time to copy takes forever, time to append takes longer? jeriryan Linux - Hardware 2 06-15-2008 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration