Linux Mint 18 boot time analysis

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
xenopeek
Level 25
Level 25
Posts: 29532
Joined: Wed Jul 06, 2011 3:58 am

Linux Mint 18 boot time analysis

Post by xenopeek »

On earlier versions of Linux Mint you could install and use bootchart to analyze your boot time. If you're having issues with Linux Mint 18 and boot (suddenly) taken minutes you can use various commands to get information that may help to find the cause. I'll list the commands I've found useful below.

Code: Select all

systemd-analyze time
systemd-analyze --no-pager blame
systemd-analyze plot > plot.svg
journalctl --no-pager -b -p3
systemctl --no-pager --state=failed
The first command gets information about how much time was spent in the Linux kernel during boot and how much time in userspace. The second command gets information about how much time each unit took to initialize during boot. The third command creates a file called plot.svg with a boot chart. These all help with figuring out where the problem is most likely to be found.

The fourth command shows all error messages from the current boot. Run it quickly after you had a slow boot or else it may show a lot of errors not relevant to the boot process.

The fifth command shows which if any units failed.

Lastly, if there is any chance the problem may be related to disks it's useful to have the output of these command:

Code: Select all

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID
cat /etc/fstab
And it's always useful to have the basics of your system so also share the output of this command:

Code: Select all

inxi -Fxzc0
This being a tutorial, please make a new topic in the Installation & Boot forum to ask for support. From the above you know what commands to run to get relevant information. Copy the output from the terminal and include it in your topic and attach the plot.svg file.
Image
chrisuk

Re: Linux Mint 18 boot time analysis

Post by chrisuk »

You might want to add systemd-analyze critical-chain to the list, as it tells you how long each service in the chain took to start... apologies if it's already part of the commands' output that you've posted
venik212
Level 1
Level 1
Posts: 47
Joined: Thu Aug 25, 2011 12:05 pm

Re: Linux Mint 18 boot time analysis

Post by venik212 »

You might want to compare the UUID of your swap partition that appears in /etc/fstab with what you get when you type blkid in the terminal. In my case booting took >3 minutes, but when I turned off my swap partition (in gparted) it boots in <9 seconds. The uuid in fstab was different from what I got with blkid. It seems that upgrading to Mint 18 changed the uuid.
User avatar
xenopeek
Level 25
Level 25
Posts: 29532
Joined: Wed Jul 06, 2011 3:58 am

Re: Linux Mint 18 boot time analysis

Post by xenopeek »

From another report the UUID can change when you resize the swap partition with GParted. I've added to include contents of /etc/fstab file to the tutorial.
Image
greywolf
Level 1
Level 1
Posts: 30
Joined: Thu Sep 19, 2013 7:20 pm

Re: Linux Mint 18 boot time analysis

Post by greywolf »

Running dual (multiple) boot Linux systems can also cause this swap problem. Some distros insist on formatting the existing swap file they find on install. This changes the UUID such that all the /etc/fstab entries are no longer valid. Pain in the "%#@"!

Boot process can "go looking" for invalid swap UUID for ages. Good advice to always check this after any change to swap.

greywolf.

ps: change to using "LABEL=" rather than "UUID" method in /etc/fstab fixes this!
It is about the Dragons - it was always about the Dragons!
venik212
Level 1
Level 1
Posts: 47
Joined: Thu Aug 25, 2011 12:05 pm

Re: Linux Mint 18 boot time analysis

Post by venik212 »

ps: change to using "LABEL=" rather than "UUID" method in /etc/fstab fixes this!
This sounds like a good idea-- could you be specific about how to do it?
Thanks
Post Reply

Return to “Tutorials”