5

I have a problem during boot: I see the message lvmetad is not active yet, using direct activation during sysinit. The message completely blocks my login process. I'm not able to switch to a non-graphical login screen (they all just show a blinking cursor) or perform any other action than rebooting with CTRL-ALT-DEL.

If I wait for a very long time (more than 10 minutes) I get the following message:

resume: Could not stat the resume file /dev/disk/by-uuid/a62a5e02...
Please type in the full path name to try again or press ENTER to boot the system:

If I press ENTER, booting resumes and my login screen comes up within a second - this only seems to work with older kernels <=4.4.0-43, with newer kernels, ENTER does nothing and I also cannot enter anything else using the keyboard.

The message after the 10 minute break resume: ... led me to think it could be related to a stale disk image after suspending to RAM, but I have no idea how to fix this.

I see no errors in dmesg, everything related to LVM looks fine there.

For a while I was able to boot without delay using kernel 4.4.0-43, but today (after a apt-get kernel upgrade) even this stopped to work.

I found these two threads about the problem, but I'm reluctant to try to change the grub video settings, since they (should) have nothing to do with lvmetad and users report that this workaround came with its own set of issues.

Lvmetad is not active yet

lvmetad is not active yet; using direct activation during sysinit

Can anybody talk me through this? Even in the old days booting did not take 10 minutes and nowadays it a 10 minute timeout seems to be a bit over the top... ;)

[EDIT] Here is the requested output:

blkid:

/dev/sda1: UUID="2EC7-7121" TYPE="vfat" PARTUUID="77533e31-4b1a-40da-9e49-ecebfb701229"
/dev/sda2: UUID="b206ab4e-2119-4d90-ab77-5088177faa08" TYPE="ext2" PARTUUID="a5ddb725-1822-4847-8fd3-c1566b83f740"
/dev/sda3: UUID="uhcPym-YPqH-XGTC-Y0YB-ynxd-K4iK-b0viGE" TYPE="LVM2_member" PARTUUID="455fe5cf-64a0-4ef5-b3e7-19e5f86b3ee4"
/dev/mapper/kubuntu--vg-root: UUID="cba585cc-e15b-419c-b055-f1fe2a56c7da" TYPE="ext4"

cat /etc/fstab:

/dev/mapper/kubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=b206ab4e-2119-4d90-ab77-5088177faa08 /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sda1 during installation
UUID=2EC7-7121  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/kubuntu--vg-swap_1 none            swap    sw              0       0

swapon did not produce any output, but with option -a:

swapon: stat of /dev/mapper/kubuntu--vg-swap_1 failed: No such file or directory

[EDIT] In my grub.cfg I find references to an lvmid that does not correspond to any of the blkid - can this be the issue?

set root='lvmid/nvk03P-ihq7-kTsM-LvZ4-DzQu-iOag-4BOz7I/kHYiDJ-9NSq-Wlkc-0YXH-HiX2-SVZ7-MPSFnp'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/nvk03P-ihq7-kTsM-LvZ4-DzQu-iOag-4BOz7I/kHYiDJ-9NSq-Wlkc-0YXH-HiX2-SVZ7-MPSFnp'  cba585    cc-e15b-419c-b055-f1fe2a56c7da

Also in grub.cfg there are some references to root and UUIDs - the UUID correspond to /boot (sda2) with --set root b2... and but two lines below there is root=/dev/mapper/kubuntu--vg-root which is a different device:

[---snip---]
if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  b206ab4e-2119-4d90-ab77-5088177faa08
    else
      search --no-floppy --fs-uuid --set=root b206ab4e-2119-4d90-ab77-5088177faa08
    fi
    linux   /vmlinuz-4.4.0-57-generic.efi.signed root=/dev/mapper/kubuntu--vg-root ro  quiet splash $vt_handoff
[---snip---]

[EDIT] Commenting the swap line in fstab does not help with booting and once the system boots, lvdisplay shows both, the root and the swap partition:

lvm> lvdisplay
  --- Logical volume ---
  LV Path                /dev/kubuntu-vg/root
  LV Name                root
  VG Name                kubuntu-vg
  LV UUID                kHYiDJ-9NSq-Wlkc-0YXH-HiX2-SVZ7-MPSFnp
  LV Write Access        read/write
  LV Creation host, time kubuntu, 2016-06-07 12:33:08 +0200
  LV Status              available
  # open                 1
  LV Size                432.86 GiB
  Current LE             110811
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

  --- Logical volume ---
  LV Path                /dev/kubuntu-vg/swap_1
  LV Name                swap_1
  VG Name                kubuntu-vg
  LV UUID                YiuKj2-FVgn-ufGg-lvZ5-IML5-w3hH-ZeHrrH
  LV Write Access        read/write
  LV Creation host, time kubuntu, 2016-06-07 12:33:08 +0200
  LV Status              available
  # open                 0
  LV     Size                31.93 GiB
  Current LE             8173
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

[EDIT] Following the suggestions of heynnema below, I remove and re-added swap. There was indeed something wrong : /proc/swaps was empty and free showed a total of 0 before removing and re-creating swap. Now it gets mounted properly and free as well as /proc/swaps show the expected output. Unfortunately the initial issue with the boot delay persists. After this step, I had to update iniramfs (update-initramfs -k all -c) - now it works. Phew. Thanks to heynnema for the great support!

  • It sounds like its not finding your swap disk. Did you make changes in your disk partitions? From GRUB, enter Recovery mode, root access, and show us the output of blkid and cat /etc/fstab. – heynnema Dec 29 '16 at 19:03
  • ps: and the swapon command. – heynnema Dec 29 '16 at 19:14
1

The lvmetad is not active yet, using direct activation during sysinit is a normal message, and is not causing your boot problem.

Somebody deleted your swap partition.

/etc/fstab has this line:

/dev/mapper/kubuntu--vg-swap_1 none            swap    sw              0       0

looking for a swap partition it never finds. The sudo blkid and the swapon commands confirm this.

Short term fix, comment out the above line in fstab:

In terminal...

gksudo gedit /etc/fstab

change

/dev/mapper/kubuntu--vg-swap_1 none            swap    sw              0       0

to this

#/dev/mapper/kubuntu--vg-swap_1 none            swap    sw              0       0

This will allow you to boot in a normal timeframe, but the system will have no defined swap space.

Long term fix, install the LVM GUI tool to manage your LVM disks:

In terminal...

sudo apt-get update
sudo apt-get install system-config-lvm

Go to the Unity dashboard and type lvm. Use this GUI tool to remake your LVM swap partition. Then go back and uncomment the line from the short term fix.

|improve this answer|||||
  • The short term fix (commenting swap in fstab) did not change anything. As for the long-term fix: lvdisplay does show a swap partition. I'll add the full information in the original question. – squarespiral Dec 30 '16 at 22:27
  • Is your sudo blkid missing a line for /dev/mapper/kubuntu--vg-swap_1? What does a pvdisplay show? – heynnema Dec 30 '16 at 22:53
  • Maybe do a swapoff (probably not really required) then remake your swap lv by deleting and re-adding it, uncommenting fstab, then do a swapon -a? – heynnema Dec 30 '16 at 23:05
  • blkid does show the swap now (/dev/mapper/kubuntu--vg-swap_1: UUID="a62a5e02-61c5-4061-8133-3accc4815743" TYPE="swap" ), it did not when I called it from the failsafe mode. – squarespiral Dec 31 '16 at 0:34
  • That's the same UUID called out in the error "Could not stat the resume file /dev/disk/by-uuid/a62a5e02...". I can't see the full UUID to compare. You might look at cat /etc/initramfs-tools/conf.d/resume and see if the UUID matches. Somewhere the UUIDs probably don't match. Or, as I suggested, you just need to remake your swap. – heynnema Dec 31 '16 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.