1

I'm trying to set up my LVM Swap in a way in which I can also resume it.

It works with a normal partition, but I can't get it to work with LVM.

My cmdline is something like:

resume=/dev/mapper/my-swap

I've tried adding rd.auto, but it didn't help anything.

I'm using fedora and the dracut ramdisk includes resume and LVM.

When trying to resume, the last message is show plymouth boot screen. Then the screen goes to power save mode and I can't interact with the machine anymore.

Note:

I also tried resume=UUID=mylvmuuid with the same results.

Update II

I tried rd.shell rd.debug and rd.break=pre-mount what I got was the kernel booting, then an image loading progress was indicated (I'm fairly sure it is related to the resume image).

After that the screens went dark as usual. And I was unable to interact with the machine.

However I was able the hear a notification sound from my desktop environment shortly after.

I don't know what is going on, but it partially seems to work. However I still don't know how to debug this...

Because: The screens are dark, mouse and keyboard input seem to be ignored;

I tried to log in and touch a file (without seeing anything), and I could not find that file after rebooting, so I'm pretty sure that the keyboard inputs are ignored.

I'll try to find something in the journal, but I didn't find anything so far(because the resume boot doesn't seem to be logged).

Update I:

My current contents of the initramfs (some omissions):

lsinitrd -k -f /boot/initramfs-4.13.16-200.fc26.x86_64.img

Image: /boot/initramfs-4.13.16-200.fc26.x86_64.img: 21M
========================================================================
Early CPIO image
========================================================================
drwxr-xr-x   3 root     root            0 Nov  6 11:30 .
-rw-r--r--   1 root     root            2 Nov  6 11:30 early_cpio
drwxr-xr-x   3 root     root            0 Nov  6 11:30 kernel
drwxr-xr-x   3 root     root            0 Nov  6 11:30 kernel/x86
drwxr-xr-x   2 root     root            0 Nov  6 11:30 kernel/x86/microcode
-rw-r--r--   1 root     root        26624 Nov  6 11:30 kernel/x86/microcode/GenuineIntel.bin
========================================================================
Version: dracut-046-3.1.fc26

Arguments: -f

dracut modules:
bash
systemd
systemd-initrd
nss-softokn
i18n
network
ifcfg
drm
plymouth
dm
kernel-modules
kernel-network-modules
lvm
resume
rootfs-block
terminfo
udev-rules
dracut-systemd
usrmount
base
fs-lib
shutdown
========================================================================
[...]
========================================================================
1

You need to use the raw DM device as seen by the system. Run swapon -s and use the device listed under "Filename" in the resume parameter.

  • Thanks, but it looks like the results are the same... It was something like /dev/dm-10. But it doesn't resume. By the way: could the dm change unexpectedly or is it bound to the UUID or something like that? – rudib Oct 27 '17 at 11:25
  • Do you know a way to debug this? The machine gets completely unresponsive and the only thing I can do is pressing the power button. It seems to happen in the ramdisk and there are no logs that I can find. At least there is nothing in the journal. – rudib Oct 27 '17 at 11:29
  • No idea how the raw DM devices map to LVs, sorry. – Ignacio Vazquez-Abrams Oct 27 '17 at 11:31
  • Thank you anyways! I've tried omitting quiet and rhbg. I've added rd.shell. I could read something like "loading image" with a progress bar... I'm not sure if the kernel or the 'swap image' was meant, but after that, everything went dark again... Any suggestions? – rudib Oct 27 '17 at 11:52
  • I guess I'll have to move swap to a regular partition... Maybe one day there will be be a solution for that... – rudib Oct 27 '17 at 15:05

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.