LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-30-2007, 09:31 PM   #1
Zaskar
Member
 
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Rep: Reputation: 30
resume: could not stat the resume device file


Heya guys, just did a fresh net install of Lenny on a semi old box, and get the error "resume: could not stat the resume device file" apon bootup. It requires me to hit enter to move past it and happens every time.

Unsure what the problem could be, during the install there was a prompt with something about uswsusp:
"Configuring uswsusp
The swap partition that was found in usuwsusp's configuration file is not active. In most cases this means userspace software suspend will not work for you and you will need to choose (or let uswsusp choose) another partition. In some corner cases however, this can be what you want. Continue without a valid swap partition? (YES/no)"
I clicked NO (not totally sure what it was for)
I also have 2 HD's, 1 for "/" and another for swap and a backup/files partition.

Any help would be great guys, thankyou

Last edited by Zaskar; 07-30-2007 at 09:45 PM.
 
Old 07-30-2007, 09:46 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Well, it is obvious there is a problem with the swap partition, either it's address is not correct in /etc/fstab, or it's not formatted. As the error does imply it cannot access the swap partition. You can try using Gparted to format the partition and make sure it's entry in /etc/fstab is correct.
 
Old 07-30-2007, 09:53 PM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
During the partitioning stage of the installation, you are required to specify a root partition, and also a swap if you desire. If you selected "manual" to configure partitions, you would have highlighted the partition you wanted to use as root and specify it's mount point as root and a file system format. Then you would highlight the partition in the second drive to be used as swap and go through the same steps to set it up. If you did not have a partition in the second drive, it more than likely was not created and formatted. Once you have made the right configurations in the partitioning stage you would select "save and write partition information" or similar, at this stage, the installer would format both partitions and you would see the progress of this step.
EDIT: You should post the results of the command "fdisk -l" as root if your unsure of what I'm thinking/talking about.

Last edited by Junior Hacker; 07-30-2007 at 10:01 PM.
 
Old 07-30-2007, 10:25 PM   #4
Zaskar
Member
 
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Original Poster
Rep: Reputation: 30
I did all that

this is my fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
/dev/sdb2 /aux ext3 defaults 0 2
/dev/sdb1 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


and this is my "fdisk -l" report:

Disk /dev/sda: 18.2 GB, 18200739840 bytes
255 heads, 63 sectors/track, 2212 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2212 17767858+ 83 Linux

Disk /dev/sdb: 9100 MB, 9100369920 bytes
255 heads, 63 sectors/track, 1106 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 122 979933+ 82 Linux swap / Solaris
/dev/sdb2 123 1106 7903980 83 Linux




thanks again for any help
 
Old 07-30-2007, 10:42 PM   #5
Zaskar
Member
 
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Original Poster
Rep: Reputation: 30
Update:
Removing uswsusp (with synaptic) stopped that from comming up.
after a reboot I went and reinstalled it with synaptic and then at reboot it happened again.
 
Old 07-30-2007, 11:52 PM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Do you frequently hibernate the system? because that's what this package enables. If you don't ever use hibernation, you can leave it un-installed.
EDIT: It also enables suspend to ram, where it stores the state of the system in swap memory.

Last edited by Junior Hacker; 07-30-2007 at 11:54 PM.
 
Old 07-30-2007, 11:59 PM   #7
Zaskar
Member
 
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Junior Hacker
Do you frequently hibernate the system? because that's what this package enables. If you don't ever use hibernation, you can leave it un-installed.
EDIT: It also enables suspend to ram, where it stores the state of the system in swap memory.
naa ill never really use the features :P

I tested something though, i did an install with everything on the same hard drive, swap and all, and nwhile I still got the uswsusp message at install, it doesnt prompt me at logon with that error. Wonder what could be the root of this problem.
 
Old 07-31-2007, 12:04 AM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Starting to sound like the system was suspended somewhere down the line, and that information is written in the swap space. For whatever reason, the system cannot resume that particular session, and powers up to a new session but tells you about the suspended session in swap that it can't resume. If there's a way to clear swap, it would eliminate the message at boot up and you can leave the package installed. Even a re-format would clear it.
 
Old 07-31-2007, 12:15 AM   #9
Zaskar
Member
 
Registered: Feb 2004
Location: NY
Distribution: Debian (Testing)
Posts: 219

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Junior Hacker
Starting to sound like the system was suspended somewhere down the line, and that information is written in the swap space. For whatever reason, the system cannot resume that particular session, and powers up to a new session but tells you about the suspended session in swap that it can't resume. If there's a way to clear swap, it would eliminate the message at boot up and you can leave the package installed. Even a re-format would clear it.
Weirdest thing was I did reformat, i did it twice with the same exact partition sizes first. Maybe because they were the same size it diddnt reformat the swap? I dunno :/
 
Old 11-01-2007, 07:15 PM   #10
clsgis
LQ Newbie
 
Registered: Nov 2007
Posts: 18

Rep: Reputation: 1
Lightbulb it's actually a udev issue

This was one of those things where you google for the error message and find fifteen people asking about it and various people who don't actually know, guessing the answers.

What actually happened is a bit of randomness due to the Userspace Device mapping daemon udevd(8). When you installed, the udev in the Debian Installer thought your swap partition was /dev/hda5 (or something). But the udev in the initial ramdisk image that brought your system up thinks your swap partition is /dev/sda5 (or something), due to a different collection of IDE disk driver modules being present.

The quick workaround for "resume: could not stat the resume device file" is to remove the uswsusp Userspace Suspend package so it doesn't look for a hibernation image during boot. The correct fix is to configure uswsusp to look for the swap device by its volume label, not its device name. When I (re)installed the uswsusp package, it created an /etc/uswsusp.conf with the wrong file name in it, and then when it made a new initrd that had the wrong file name in it too. So then I corrected /etc/uswsusp.conf and made an updated ramdisk image. This worked.

To put a volume name on a swap partition, you have to deactivate swap and make a new swap image. Then fix /etc/uswsusp.conf. Then fix initrd. Something like this. Type these commands as root. Your mileage may vary:

swapon -s # find out what your current swap device is
swapoff /dev/sda7 # deactivate it for now.
mkswap -c -L swap-here /dev/sda7 # make a new one with a label.
swapon LABEL=swap-here # reactivate it by name just to be sure
swapon -s # you can't be too paranoid, check it again.
grep device /etc/uswsusp.conf # look at the incorrect line in the file

# then fix it. You might prefer to use a text editor.
# I'm using a perl command to edit-in-place.
# of course, fill in the actual names that apply to your case

perl -pi -e 's,/dev/hda7,LABEL=swap-here,' /etc/uswsusp.conf
grep device /etc/uswsusp.conf # check if the edit worked
update-initrd -u `uname -r`

Now you should be able to reboot without user suspend hanging things up.
 
Old 11-12-2007, 02:06 PM   #11
FlyingAvatar
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
FWIW, I solved this problem by removing then reinstalling the uswsusp package. (Suspend to disk now works correctly as well since it regenerated the uswsusp.conf with the correct device path.)
 
Old 03-28-2008, 07:11 PM   #12
fraber01
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
Lightbulb Solution.. the simple way

I got this problem, and thank to you guys, it pointed out uswsusp was the problem. the simple way to fix this is either to correct the device in /etc/uswsusp.conf or even better call sudo dpkg-reconfigure uswsusp and set the right swap drive. This problem happened to me after I changed my partitions upon reinstalling my XP on the 2 first partitions of my drive, merging them into only one partition. The others partitions, my linux ones, all changed (minus one).
 
Old 03-11-2009, 07:40 PM   #13
kmchen
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
same on 11/3/9

dpg-reconfigure worked perfect.

Tried first clsgis's but didnot work cause update-initrd was not existing on debian anymore. Seems it would have work with update-ramfs but did not try.
Thanks a lot guys !
 
Old 04-30-2010, 12:52 PM   #14
philippevb
LQ Newbie
 
Registered: Apr 2010
Location: Orleans France
Distribution: Debian etch - Puppy 4.3.1
Posts: 1

Rep: Reputation: 0
Lightbulb could not stat the resume device file swap

Ok, I'd just try
in root console
update-initramfs
according to man
The initrd.gz file is reconstructed
The boot message disappeared asap.
 
Old 05-19-2010, 11:22 AM   #15
hunter3740
LQ Newbie
 
Registered: Mar 2010
Location: Pittsburgh
Distribution: Debian 6
Posts: 27

Rep: Reputation: 16
trouble mounting swap partition on reboot

Quote:
Originally Posted by philippevb View Post
Ok, I'd just try
in root console
update-initramfs
...
Not to discount advice from clsgis, but "sudo update-initramfs -u" worked for my next "sudo reboot" (i.e. quick and simple single command), but then my problem came back (unless I hard booted); so, just "sudo apt-get remove --purge uswsusp" since I don't really need to suspend my user space on reboot (and then "sudo apt-get autoremove" to get rid of a few libs). But my bootup still hung on reboot (just a slightly different error about my root partition)! Did a hard boot, and now rebooting (multiple times now) seems fine (i.e. I think uninstalling uswsusp and hard boot combo (to clear things out?) did the trick for me--just FYI).
 
  


Reply

Tags
cryptsetup, hibernate, uswsusp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HAL deamon fails & resume device failing too miketaylor Fedora - Installation 3 10-11-2007 03:58 PM
resume: cannot stat resume device file sixerjman Linux - Kernel 0 05-27-2007 04:09 PM
resume search in file with grep t2000 Programming 15 11-27-2006 03:42 AM
uploading a file and cant resume skog Slackware 0 03-08-2004 11:11 PM
resume supported file download howto ? juby Linux - General 1 03-24-2003 06:24 AM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration