Boot process asks for "resume device file"

Bug #108230 reported by Lauri Kainulainen
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Confirmed
Undecided
Unassigned
uswsusp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After upgrading to Feisty my laptop stopped booting. The process would hang at the start of usplash (the meter would go for a few millimeters). There was no way to continue with usplash, but when using the recovery mode the following text would appear:

"resume: could not stat the resume device file. Please type in the name to try again or press ENTER to boot the system"

Then I pressed enter got to init1 and moved to init2.

I've been scouring around /etc and trying to find the correct place where to set the "device file", but no luck..

Revision history for this message
Lauri Kainulainen (luopio) wrote :

Ok. I guess I got it solved. Did a reinstall of initramfs-tools and I guess the reconfiguring did the trick.

Revision history for this message
Vincent (vincent-) wrote :

I got the same message after upgrading to Feisty and removing mdadm (and changing manually all the hda to sda in /etc/fstab, /etc/blkid.tab and the menu.lst):
"Attempting to boot the system
kinit: No resume image, doing normal boot
resume: libgcrypt version 1.2.3
resume: could not stat the resume device file
..."
How do you reinstall initramfs-tools? I'm quite frigthened to apt-get remove initramfs-tools.

Revision history for this message
Lauri Kainulainen (luopio) wrote :

Apt-get does not seem to be able to do a reinstall, but wajig can. So just apt-get install wajig and do a "wajig reinstall initramfs-tools". I guess it just does the apt-get remove and install but uses --ignore-deps or something with the commands..

Revision history for this message
Vincent (vincent-) wrote :

So, I install wajig and reinstall initramfs-tools but, as before, it cannot resume during the boot process :(

Is there a file to delete where the state suspend2disk/need to resume is stored?

Revision history for this message
Lauri Kainulainen (luopio) wrote :

Sorry I can't help you with the actual resuming. My problem was that resume asks for the device file or wants enter to be pressed and if I boot through the default grub-option (with usplash on) it will just hang there. Booting via safe mode lets me press enter so I can continue.

If it's a resume related problem (e.g. hibernate does not work) then I guess it's related to uswsusp or whatever ubuntu uses by default.

Revision history for this message
Vincent (vincent-) wrote :

Sorry, I've badly stated the problem: during a normal (re)boot the computer asks me to location where to find the resume file. Strange since no resume file should be needed. Was it your problem too?

Revision history for this message
Lauri Kainulainen (luopio) wrote :

Yes. I had the exact same problem. IIRC it was the reinstall of initramfs-tools that helped. You might also try "dpkg-reconfigure initramfs-tools" since that could remove the faulty bits from your configs.

And I don't even use hibernate/resume on this laptop, so it was pretty surprising that I got this problem...

Revision history for this message
Torsten Spindler (tspindler) wrote :

Lauri, you can access the console where the question is waiting for input with <CTRL-ALT-F1>. As you discovered, the other way is to boot in safe mode.

I did run into the same problem after changing swap partitions and changing some ACPI settings.

Revision history for this message
kamilek_snk (kamilek-snk-gmail) wrote :

Hi, I wanted to sorry on start for my weak English
I have Desktop computer and I have same problem but It saw not after upgrade to Feisty - It not important "when"

When I boot The process would hang at the start of usplash (the meter would go for a few millimeters) - exactly
Now I pressed CTRL + ALT + F1 end I see:

resume: libgcrypt version 1.2.3
resume: Could not stat resume device file.
            Please type in the file name to try again boot the system

What going on ?
I install wajig and reinstall initramfs-tools but it has not helped.

Revision history for this message
Torsten Spindler (tspindler) wrote : Re: [Bug 108230] Re: Boot process asks for "resume device file"

Try a 'sudo update-initramfs'

Revision history for this message
Igor Konnov (igor-konnov) wrote :

I have encountered the same problem. In my case, swap device name (/dev/hda...) was changed to UUID in /etc/fstab during transition to Edgy. And after transition to Feisty swap device UUID changed during each reboot. So, I have modified swap UUID=... to /dev/sda... in /etc/fstab. And finally I had to run 'sudo update-initramfs' also.

Hope, this helps.

Revision history for this message
kamilek_snk (kamilek-snk-gmail) wrote :

"Try a 'sudo update-initramfs'"

Terminal ask me:

krzaku@krzaku-desktop:~$ sudo update-initramfs
Password:
You must specify at least one of -c, -u, or -d.

Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version] Specify kernel version or 'all'
 -c Create a new initramfs
 -u Update an existing initramfs
 -d Remove an existing initramfs
 -t Take over a custom initramfs with this one
 -b Set alternate boot directory
 -v Be verbose
 -h This message

What I must choose ?

Revision history for this message
Vincent (vincent-) wrote :

I did a "dpkg-reconfigure initramfs-tools" but it didn't solved the problem

On 4/27/07, Lauri Kainulainen <email address hidden> wrote:
> Yes. I had the exact same problem. IIRC it was the reinstall of
> initramfs-tools that helped. You might also try "dpkg-reconfigure
> initramfs-tools" since that could remove the faulty bits from your
> configs.
>
> And I don't even use hibernate/resume on this laptop, so it was pretty
> surprising that I got this problem...
>
> --
> Boot process asks for "resume device file"
> https://bugs.launchpad.net/bugs/108230
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
kamilek_snk (kamilek-snk-gmail) wrote :

My problem is solved
I run LiveCD generate initramfs

update-initramfs -u -k all

Next, I copy generated file and copy In my case to /media/disk-2/boot/
And problem is solved

Revision history for this message
Jan Kaláb (pitel) wrote :

I had the same problem after upgrade to kernel 2.6.20-16. update-initramfs -u -k all solved it, it now boots correctly. But i guess it should be made automatic, because BFU won't know what to do.

Changed in initramfs-tools:
status: Unconfirmed → Confirmed
Revision history for this message
Lauri Kainulainen (luopio) wrote :

I guess I should mention that the problem did not reappear when I did a complete reinstall of Ubuntu (repartitioned the hdd, etc.). It only showed up after I upgraded.

Revision history for this message
kamilek_snk (kamilek-snk-gmail) wrote :

No... 5 minutes ago a problem again showed :/ no.... It is showed after when I upgrade kernel form 2.6.20-15-generic to 2.6.20-16-generic.

In my case update-initramfs -u -k all not solved it,
Plead Help Me and keep looking

Revision history for this message
dlugidll (dlugilin) wrote :

i use ubuntu with kernel
2.6.20-16-generic

in /etc/uswsusp.conf
i change
resume device = /dev/sda5
to
resume device = /dev/hda5

ofcorce i have resume partition as /dev/hda5
I did a dpkg-reconfigure uswsusp, and took all the defaults except

Revision history for this message
dlugidll (dlugilin) wrote :

i forgote
i change /etc/fstab from sda to hda,

Revision history for this message
Brett Johnson (linuxturtle) wrote :

So, this looks like a uswsusp bug to me, not a initramfs-tools bug. I'd forgotten that I'd even installed uswsusp, but just removing the packages fixed the problem for me.

Revision history for this message
Brett Johnson (linuxturtle) wrote :

the /etc/uswsusp.conf file is broken after a recent upgrade -- looks like this is a uswsusp bug, not initramfs-tools

Revision history for this message
Vincent (vincent-) wrote :

For me this solved with the upgrade to the next kernel version :)

On 6/1/07, Brett Johnson <email address hidden> wrote:
> the /etc/uswsusp.conf file is broken after a recent upgrade -- looks
> like this is a uswsusp bug, not initramfs-tools
>
> ** Changed in: uswsusp (Ubuntu)
> Sourcepackagename: initramfs-tools => uswsusp
>
> --
> Boot process asks for "resume device file"
> https://bugs.launchpad.net/bugs/108230
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
scottvan (laylathedog) wrote :

I have the same problem. How do you uninstall uswsusp? I'm new at this.

Revision history for this message
Lauri Kainulainen (luopio) wrote :

One way of doing it is through the graphical user interface of synaptic (Menu: System->Preferences->Synaptic...). The quicker way of doing it is via the command line:

1. Open a terminal (Menu: Accessories -> Terminal)
2. Type in: sudo apt-get remove --purge uswsusp
3. Press enter and give your password

The --purge option also removes all configurations related to uswsusp just to be sure. You can leave it out if you want.

Revision history for this message
scottvan (laylathedog) wrote :

Hey that fixed it! Thanks, Lauri!

Revision history for this message
Shashmik (philbinj) wrote :

Ok, just thought i'd write down what I did to fix it. The problem for me turned out to be the swap partition not staying in one place (/dev/sda3 one day, /dev/sdb3 the next), so I:

1. Find the current location for the swap partition: sudo /sbin/fdisk -l | grep swap
2. Find the UUID: sudo vol_id [CUR_LOC]
3. Edit uswsusp.conf: sudo gedit /etc/uswsusp.conf and replace eg. resume device = /dev/sda3 with resume device = /dev/disk/by-uuid/[UUID]
4. Run sudo update-initramfs -u

Revision history for this message
psl (slansky) wrote :

I think I have the same problem after upgrade from Ubuntu 7.04 to 7.10 (i386) on my notebook. Disk was named hda in 7.04 (kernel 2.6.20) but it is sda in 7.10 (kernel 2.6.22). And resume after boot is looking for hda6 (swap partition) but cannot find it. When splash screen is active, it is deadlock as pressing ENTER from user is expected to confirm this message but message is not visible. And ENTER cannot be entered, I have reboot. When I boot without "splash"parameter to the kernel, I can see in text console the problem.

When I choose "recovery mode", I can boot the Ubuntu 7.10 without problem.

I can update with screenshots if anyone is interested.

Several problems:
- splash screen doesn't capture message with expected input from the user; it results in deadlock that newcomer cannot fix :-(
- distribution update process created wrong ramdisk (reference to hda disk that doesn't anymore as it was renamed to sda disk in the new kernel).
- is missing resume disk so critical error that confirmation from the user is needed? I cannot find this information in any log file anyway (dmesg, /var/log/messages, etc).

Revision history for this message
Alex Sheppard (alex-knows-best) wrote :

Had this problem (on debian), with the info given here and a bit of extra thought i got it figured out and fixed.

The problem was that the ram disk used in the boot process was made when my swap partition was /dev/hda2. The problem appeared when i had to rearrange my hard disk and moved swap to /dev/hda5.

The fix was updating the ram disk using update-initramfs.

BUT, That didn't fix it straight away.

I noticed that it had updated the ram disk for the latest kernel, but my grub entry was still calling a previous kernel version.

So, anyone for whom the update-initramfs didn't help, check the the ram disk updated corresponds to the one actually used in the boot process!!

Revision history for this message
Joshua Kugler (jkugler) wrote :

This bug is still present in Hardy. I upgraded from 7.04, and when I booted today, I got this message:

resume: libcrypt version 1.2.4
resume: Could not stat the resume device file '/dev/mapper/cswap'
Please type in the full pathname to try again
or press ENTER to boot the system:

When I boot, however, I have my full compliment of swap memory.

Running update-initramfs -u -k all give me:

update-initramfs: Generating /boot/initrd.img-2.6.24-16-generic
cryptsetup: WARNING: found more than one resume device candidate:
                     /dev/mapper/cswap
                     UUID=65336f5d-40f3-4180-b930-53c4586e9f40
cryptsetup: WARNING: target cswap has a random key, skipped
root@KuglerSKLaptop:/etc# nano fstab
root@KuglerSKLaptop:/etc# sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-2.6.24-16-generic
cryptsetup: WARNING: found more than one resume device candidate:
                     /dev/mapper/cswap
                     UUID=65336f5d-40f3-4180-b930-53c4586e9f40
cryptsetup: WARNING: target cswap has a random key, skipped
update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic
cryptsetup: WARNING: found more than one resume device candidate:
                     /dev/mapper/cswap
                     UUID=65336f5d-40f3-4180-b930-53c4586e9f40
cryptsetup: WARNING: target cswap has a random key, skipped

My relevant part of fstab:

# /dev/sda2
#UUID=65336f5d-40f3-4180-b930-53c4586e9f40 none swap sw 0 0
/dev/mapper/cswap none swap sw 0 0

/etc/uswsusp.conf:

# /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both
#resume device = UUID=65336f5d-40f3-4180-b930-53c4586e9f40
resume device = /dev/mapper/cswap
splash = y
compress = y
early writeout = y
image size = 977818746
RSA key file = /etc/uswsusp.key
shutdown method = platform

Revision history for this message
Joshua Kugler (jkugler) wrote :

FIX!

In my /etc/uswsusp.conf file, I found this:

#resume device = UUID=65336f5d-40f3-4180-b930-53c4586e9f40
resume device = /dev/mapper/cswap

Apparently the upgrade had modified it. I uncommented the first line, and commented out the second line, and no more complaints!

Revision history for this message
Joshua Kugler (jkugler) wrote :

Sorry...I also ran

update-initramfs -u -k all

Revision history for this message
blackest_knight (blackest-knight) wrote :

Similar problems here

i renamed /etc/uswsusp.conf to olduswsusp.conf then
sudo dpkg-reconfigure initramfs-tools linux-image-2.6.24-19-generic
rather than
sudo dpkg-reconfigure initramfs-tools

the reason being that this is the kernel i am using yet i have linux-image-2.6.24-21-generic on the system and without specifying the kernel only the most recent version was getting updated.

I have an Aspire one with ssd and an 8g sd card which has a 6 gb reiserfs and a 2gb swap file.
the device to resume from was the swap file. unfortunately this isn't mounted when the system tries to resume hence the need to ctrl alt f1 and enter. obviously aspire ones with hdd do have a swap file already mounted at this point and it seems that there is no issue with suspend and hibernate.
for ssd aspire ones
The solution seems to be to create a large enough swap file on the ssd so its available when trying to resume. admittedly thats going to restrict the size of the system partition to 6gb or so probably keeping /home there also. reiserfs seems to be resilient and hasn't been corrupted unlike ext2 and ext3 file systems on the sd card (so far).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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