The initramfs will attempt to resume from /dev/dm-1

25,120

Solution 1

It may happen when you install another OS alongside the first one. Means that swap partition has changed UUID and you need to adjust that in fstab.

To check that run sudo blkid, that gives you actual UUIDs of your swaps, swapon -s will show which one is active, then compare its UUID to the one in /etc/fstab.

If different, edit/create the file /etc/initramfs-tools/conf.d/resume with RESUME=UUID=<swap UUID from blkid>. THen run update-initramfs -u -k all and if it doesn't complain, you win.

Solution 2

This might actually be a (not even new) bug as mentioned here. They and others suggest to add RESUME=none to /etc/initramfs-tools/conf.d/resume.

I needed to sudo-create the file /etc/initramfs-tools/conf.d/resume first on my U 19.04 machine. With sudo update-initramfs -u -k all you test and deploy the initramfs image. See details here.

Share:
25,120
axblount
Author by

axblount

Updated on September 18, 2022

Comments

  • axblount
    axblount almost 2 years

    I'm setting up a new Ubuntu 18.04 server and have already played through one backup/restore loop. So the entire system has been restored from backup with a fresh RAID and LVM volumes.

    Now recently, unattended-upgrades has reported this:

    Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
    update-initramfs: Generating /boot/initrd.img-4.15.0-66-generic
    I: The initramfs will attempt to resume from /dev/dm-1
    I: (/dev/mapper/vg0-swap)
    I: Set the RESUME variable to override this.
    

    I tried to find out what that actually means but wasn't successful. What is it resuming there? Some process of generating boot files? I know it can take a while do do that. Does it have to do with the RAID? That is long finished with its resync. I don't get it. And what's actually wrong? What does that message want me to do? I'm clueless. If I don't need it, how can I make it go away?

    The server did reboot successfully twice after that message so it can't be important. (If that "I" was supposed to mean something like that.)

    Here's some commands if that helps:

    > lvs
      LV   VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
      root vg0 -wi-ao---- 400.00g
      swap vg0 -wi-ao----   8.00g
    
    > cat /proc/mdstat
    Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
    md1 : active raid1 nvme1n1p2[0] nvme0n1p2[1]
          499449152 blocks super 1.2 [2/2] [UU]
          bitmap: 1/4 pages [4KB], 65536KB chunk
    
    md0 : active raid1 nvme0n1p1[1] nvme1n1p1[0]
          523264 blocks super 1.2 [2/2] [UU]
    
    unused devices: <none>
    

    I can't find a good command to show something about these "dm-0" and "dm-1" devices that are also related to the RAID I guess.

  • axblount
    axblount over 4 years
    Interesting, but there is no UUID at all in my fstab.
  • user1480705
    user1480705 almost 4 years
    I changed the swap entry in my fstab from /dev/mapper/kubuntu--vg-swap_1 to UUID="5a69d76a-90b4-4908-9eff-10a144b10b4c" but I still get the same message.
  • kleinfreund
    kleinfreund almost 4 years
    I ran into this issue after installing a fresh Ubuntu 20.04 with full disk encryption and doing the first apt update and apt upgrade after logging in. During the first cycle, I paid no attention to the initramfs message mentioned in the question. After a reboot, the system couldn’t boot and I didn’t manage to recover the installation. Upon the second cycle, before rebooting, I followed these and only these steps and now everything seems to be in order. Thank you.
  • tatsu
    tatsu almost 4 years
    sudo update-initramfs -u -k all doesn't create /etc/initramfs-tools/conf.d/resume for me
  • Mario
    Mario almost 4 years
    That's not what these tools do. I needed to create the file resume (it wasn't there), and update-initramfs does its own job (installing/setting up a special RAM-based boot file system but what happens there exceeds my knowledge).
  • ross minet
    ross minet over 3 years
    Right Deniis. I tried to install Parrot on a usb. It reformated the Ubu 20 swap and changed the UUID. After changing UBU's fstab to the new swap UUID, the swap was active but boot time was quite slower (on a ssd). Running initramfs fixed it: sudo update-initramfs -u -k all
  • MrMesees
    MrMesees over 3 years
    This and a BIOS update strangely were what I seem to have needed in my latest iteration of "Why in the hell is an Asus X556UB now failing to boot". Thanks for the info on where the file is (the message should really say where to set RESUME and what a value for F-OFF is). 20.04 here. Around middle of the year this started and has been a royal PITA since.
  • Daniel
    Daniel over 2 years
    I'm in Ubuntu 20.04 with encrypted disk. My swap appeared in /etc/fstab as /dev/mapper/ubuntu--vg-swap_1 and /proc/swaps shows /dev/dm-1. There command update-initramfs was giving me this error. Thing is, /dev/ubuntu-vg/swap_1 actually points to /dev/dm-1 we can check with $ ls -l /dev/ubuntu-vg/swap_1. In any case, I edited the file /etc/initramfs-tools/conf.d/resume as suggested and it worked. Thanks!
  • David
    David over 2 years
    Hello. It looks like a lot of this answer is just not part of an answer, does not really help to bury the answer under a lot of other stuff. As for a new LTS its more then a few days schedule release is April 21.
  • Animesh Srivastava
    Animesh Srivastava over 2 years
    Your answer is too wordy and lengthy. Please edit it to be more to the point of what you're saying. After reading it a few times, it's still not clear if you found the problem or not.
  • Admin
    Admin about 2 years
    I got the message 'update-initranfs' not found.