Page 1 of 1

Linux Mint 18 boot time analysis

Posted: Wed Aug 03, 2016 3:13 pm
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.

Re: Linux Mint 18 boot time analysis

Posted: Wed Aug 03, 2016 3:27 pm
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

Re: Linux Mint 18 boot time analysis

Posted: Fri Aug 05, 2016 3:54 am
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.

Re: Linux Mint 18 boot time analysis

Posted: Fri Aug 05, 2016 6:25 am
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.

Re: Linux Mint 18 boot time analysis

Posted: Fri Aug 05, 2016 6:32 pm
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!

Re: Linux Mint 18 boot time analysis

Posted: Sun Aug 07, 2016 3:09 am
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