Linux Mint 18 boot time analysis

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
xenopeek
Level 24
Level 24
Posts: 21470
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Linux Mint 18 boot time analysis

Postby xenopeek » Wed Aug 03, 2016 3:13 pm

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 -Fxz

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

User avatar
chrisuk
Level 4
Level 4
Posts: 499
Joined: Thu Jun 12, 2008 6:16 am

Re: Linux Mint 18 boot time analysis

Postby chrisuk » Wed Aug 03, 2016 3:27 pm

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
Chris

Manjaro MATE - Antergos MATE - MX Linux - LMDE MATE

venik212
Level 1
Level 1
Posts: 30
Joined: Thu Aug 25, 2011 12:05 pm

Re: Linux Mint 18 boot time analysis

Postby venik212 » Fri Aug 05, 2016 3:54 am

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 24
Level 24
Posts: 21470
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Linux Mint 18 boot time analysis

Postby xenopeek » Fri Aug 05, 2016 6:25 am

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: 22
Joined: Thu Sep 19, 2013 7:20 pm

Re: Linux Mint 18 boot time analysis

Postby greywolf » Fri Aug 05, 2016 6:32 pm

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: 30
Joined: Thu Aug 25, 2011 12:05 pm

Re: Linux Mint 18 boot time analysis

Postby venik212 » Sun Aug 07, 2016 3:09 am

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


Return to “Tutorials”