boot hangs on missing swap partition

Bug #1466314 reported by Michael Heuberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

With the recent kernel update for Ubuntu 15.04 the boot process takes so long. At this line I have to wait 1:30 min until it gets over with it:

> UPDATE UTMP System Boot/Shutdown ... (progress bar here)

How can we disable this? And why has the latest kernel introduced this?

My system:

$ uname -a
Linux M2 3.19.0-21-generic #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

Hello, any news? This is bugging me ...

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

$ uname -a
Linux M2 3.19.0-21-generic #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 69
Model name: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
Stepping: 1
CPU MHz: 3047.835
CPU max MHz: 3300.0000
CPU min MHz: 800.0000
BogoMIPS: 5387.47
Virtualisation: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

$ systemd-analyze 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 39.801s
└─multi-user.target @1min 39.801s
  └─virtualbox.service @1min 39.770s +30ms
    └─network-online.target @1min 39.769s
      └─network.target @1min 30.565s
        └─NetworkManager.service @1min 30.291s +269ms
          └─basic.target @1min 30.264s
            └─sockets.target @1min 30.263s
              └─dbus.socket @1min 30.262s
                └─sysinit.target @1min 30.235s
                  └─systemd-update-utmp.service @1.914s +27ms
                    └─systemd-tmpfiles-setup.service @1.842s +69ms
                      └─systemd-journal-flush.service @1.805s +24ms
                        └─systemd-remount-fs.service @1.799s +4ms
                          └─systemd-fsck-root.service @1.785s +13ms
                            └─systemd-fsckd.socket @153ms
                              └─-.slice @91ms

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please give the output of

  sudo systemctl status -l systemd-update-utmp.service

and do "sudo journalctl -ab > /tmp/journal.txt" and attach /tmp/journal.txt ? Perhaps this contains an useful error message what's going wrong with this. It would also be useful if you could boot with the additional "systemd.log_level=debug" kernel option (in grub) before, so that the journal contains debug messages from systemd-update-utmp.

Thanks!

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

```
$ sudo systemctl status -l systemd-update-utmp.service    develop
● systemd-update-utmp.service - Update UTMP about System Boot/Shutdown
   Loaded: loaded (/lib/systemd/system/systemd-update-utmp.service; static; vendor preset: enabled)
   Active: active (exited) since Tue 2015-06-30 09:06:02 NZST; 34min ago
     Docs: man:systemd-update-utmp.service(8)
           man:utmp(5)
 Main PID: 571 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/systemd-update-utmp.service

Jun 30 09:06:02 M2 systemd[1]: Starting Update UTMP about System Boot/Shutdown...
Jun 30 09:06:02 M2 systemd[1]: Started Update UTMP about System Boot/Shutdown.
```

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

@pitti I don't know how to add "systemd.log_level=debug" via command-line or grub-customzier2 - can you help?

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks. So systemd-update-utmp.service started in no time, this is a red herring. The problem is this:

Jun 30 09:07:31 M2 systemd[1]: Job dev-disk-by\x2duuid-bb8b6759\x2d8fdb\x2d4e4b\x2d879b\x2d7701cb217d2a.device/start timed out.
Jun 30 09:07:31 M2 systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-bb8b6759\x2d8fdb\x2d4e4b\x2d879b\x2d7701cb217d2a.device.
Jun 30 09:07:31 M2 systemd[1]: Dependency failed for /dev/disk/by-uuid/bb8b6759-8fdb-4e4b-879b-7701cb217d2a.
Jun 30 09:07:31 M2 systemd[1]: Dependency failed for Swap.
Jun 30 09:07:31 M2 systemd[1]: Job swap.target/start failed with result 'dependency'.
Jun 30 09:07:31 M2 systemd[1]: Job dev-disk-by\x2duuid-bb8b6759\x2d8fdb\x2d4e4b\x2d879b\x2d7701cb217d2a.swap/start failed with result 'dependency'.
Jun 30 09:07:31 M2 systemd[1]: Job dev-disk-by\x2duuid-bb8b6759\x2d8fdb\x2d4e4b\x2d879b\x2d7701cb217d2a.device/start failed with result 'timeout'.

It seems your /etc/fstab contains a swap partition (by UUID) which isn't found any more. This might be a regression from the new kernel if some disk/file system related driver changed. Can you please copy&paste the output of

  sudo blkid
  ls -lR /dev/disk/by-uuid/
  grep -v '^#' /etc/fstab

Thanks!

summary: - UTMP Update makes booting 1:30min longer
+ boot hangs on missing swap partition
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

$ sudo blkid
/dev/sda1: UUID="b2f035dd-f14c-4a64-8834-5116d2df7864" TYPE="ext4" PARTUUID="1173afaf-01"
/dev/sda2: UUID="bb8b6759-8fdb-4e4b-879b-7701cb217d2a" TYPE="swap" PARTUUID="1173afaf-02"

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

$ ls -lR /dev/disk/by-uuid/
/dev/disk/by-uuid/:
total 0
lrwxrwxrwx 1 root root 10 Jul 6 09:54 b2f035dd-f14c-4a64-8834-5116d2df7864 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 6 09:54 bb8b6759-8fdb-4e4b-879b-7701cb217d2a -> ../../sda2

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

$ grep -v '^#' /etc/fstab
UUID=b2f035dd-f14c-4a64-8834-5116d2df7864 / ext4 errors=remount-ro 0 1
UUID=bb8b6759-8fdb-4e4b-879b-7701cb217d2a none swap sw 0 0

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

yes, looks like i have no working swap. but when i open the disk app, i see an active 8.2 GB swap partition on /dev/sda2 ... ??

Revision history for this message
Martin Pitt (pitti) wrote :

So the swap partition looks fine -- it exists in the kernel and in /dev/disk-by-uuid/, and /etc/fstab refers to the correct device.

But it indeed seems that the kernel has some difficulty with detecting it:

Jun 30 09:06:01 M2 kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jun 30 09:06:01 M2 kernel: sda: sda1

(i. e. missing "sda2" there). So it looks like sda2 might appear much later. Let's try the debug log again: When you boot, press the left Shift key right after powering on, this should get you into the Grub boot menu. There, press 'e', edit the line that starts with "linux" to append " debug", then press Ctrl+X to boot. After that, wait until you have a /dev/sda2 (you can also check in Disks), and do "sudo journalctl > /tmp/journal.txt" again and attach that.

Thanks!

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

Hmmm, after a recent apt-get dist-upgrade this problem seems to be gone. Unable to reproduce this at the moment ...

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Michael. So I'll close this report for the time being. Please yell here when you see it again and reopen (or I'll reopen it for you, I remain subscribed).

Changed in systemd (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.