0

I have searched and read so many questions and blogs including the ArchWiki but failed to find how to reasonably speed up the boot process.

Here is a summary of a few things I've done:

  1. Checked fstab file confirming that the UUID is the same as that for /dev/sda3 where my filesystem is.

  2. Disabled most startup items(including apt updates)

  3. Checked to see if the issues was with my grub config, changed nomodeset and quiet splash which made my boot time worse.

  4. Read something about blacklisting the tmp_module but had no idea what that was so didn't try.

I have listed only a few things I can remember off of my head.

This is the output I get from systemd:

systemd-analyze  blame | head
         23.550s dev-sda3.device
         21.272s systemd-journal-flush.service
         16.297s apport-autoreport.service
         15.562s dev-loop21.device
         15.413s dev-loop20.device
         15.115s dev-loop13.device
         15.040s dev-loop12.device
         15.039s dev-loop11.device
         15.021s dev-loop19.device
         14.225s dev-loop14.device

As it can probably be seen, this is unusually slow and I right now am not sure how to best cut these times. If it helps, I'm dual booting from a 1TB external HDD.

Output from critical chain:

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 4.977s
└─multi-user.target @1min 4.975s
  └─postfix.service @1min 4.902s +70ms
    └─postfix@-.service @55.756s +9.141s
      └─network-online.target @55.753s
        └─NetworkManager-wait-online.service @49.616s +6.136s
          └─NetworkManager.service @41.505s +8.108s
            └─dbus.service @38.428s
              └─basic.target @38.298s
                └─sockets.target @38.295s
                  └─snapd.socket @38.251s +38ms
                    └─sysinit.target @37.976s
                      └─apparmor.service @33.286s +4.689s
                        └─local-fs.target @33.280s
                          └─run-user-121.mount @1min 5.982s
                            └─local-fs-pre.target @12.209s
                              └─systemd-tmpfiles-setup-dev.service @8.726s +3.47
                                └─kmod-static-nodes.service @8.359s +362ms
                                  └─systemd-journald.socket @8.355s
                                    └─system.slice @8.304s

How can I best solve this?

Thank you!

NelsonGon
  • 117
  • 1
    A radical way to get a faster boot process is to try and install a light-weight community flavour of Ubuntu: Lubuntu, Ubuntu Budgie, Ubuntu MATE or Xubuntu. I think Lubuntu is the lightest one, but all of them are faster than standard Ubuntu and you should select the flavour, that you like best (so try without installing before you decide ...) – sudodus Sep 11 '19 at 10:42
  • 1
    I find that 'critical chain' provides the best output for low-hanging fruit: Looks like 9 seconds for your mailserver ( postfix@-.service ), 6 seconds waiting for the network to respond ( NetworkManager-wait-online.service ), another 6 seconds of Gnome pre-start ( run-user-121.mount ) – user535733 Sep 11 '19 at 12:32
  • Thanks all, I unfortunately cannot try a different flavor. I will just get a different computer and avoid the whole external hdd boot scenario. Using an SSD seems like a better idea. I do have an old laptop running Mint and it literally boots in seconds but I don't use it for serious work since it is 32 bit and won't support most programs. – NelsonGon Sep 11 '19 at 13:26
  • @karel I already did as far as I know what those answers state. However, recent kernel updates seem to have slashed the boot time. – NelsonGon Nov 17 '19 at 05:29
  • 1
    Good self-answer. – karel Nov 17 '19 at 05:30
  • Alright, I will write up one later in the day. – NelsonGon Nov 17 '19 at 05:31
  • 1
    If you also post the same answer as an answer to this question I will check back to see if you posted an answer there and upvote it. – karel Nov 17 '19 at 05:32

1 Answers1

0

After several updates to the kernel over the past two months, boot time was significantly slashed(ie boot now takes less time). This answer is written as of 18/11/2019 for Linux Kernel(patch) 5.0.0-36 Ubuntu 18.04.

It is worth mentioning that I had tried to slash boot time as suggested here to no avail. The next LTS release(20.04) also promises faster boot times.

NelsonGon
  • 117