PDA

View Full Version : Unable to access resume device



agrippas
30th May 2006, 10:10 PM
Here's a minor but weird one:

Since moving the swap partition from /dev/hda6 to /dev/hdd6 I'm getting an "unable to access resume device" message everytime I boot.

Previous fstab line was:

/dev/hda6 swap swap defaults 0 0

The modified is:

/dev/hdd6 swap swap defaults 0 0

Apart from that message, system boots without other problems.
grub.conf doesn't mention any swap labels or partitions.

What do I do wrong? Is there any fix?

giulix
31st May 2006, 09:19 AM
Yes, use swapoff, mkswap and swapon.

agrippas
31st May 2006, 09:46 AM
Cheers dude, it did the trick.

Walius
23rd June 2007, 10:07 AM
Ive maked swapoff, mkswap and swapon but after reboot its the same: unable to access resume device (hdc3) and my swap now is sda3....

giulix
23rd June 2007, 10:33 AM
And your fstab ?

Walius
23rd June 2007, 09:39 PM
LABEL=/ / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/sda3 swap swap defaults 0 0
/dev/sda2 /mnt/C ntfs-3g force 0 0
/dev/sda5 /mnt/D ntfs-3g force 0 0



i think my fstab is OK ( is it....? )

giulix
24th June 2007, 12:36 AM
It appears so. Is there a remnant resume entry in your /boot/grub/menu.lst, perhaps ?

Walius
24th June 2007, 05:54 AM
default=0
timeout=3
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-1.3228.fc7)
root (hd0,3)
kernel /boot/vmlinuz-2.6.21-1.3228.fc7 root=LABEL=/ rhgb quiet acpi=off
initrd /boot/initrd-2.6.21-1.3228.fc7.img


here is my grub.conf entries for fedora, it seems OK for me too... :(

bill_f
24th June 2007, 05:41 PM
Could be your old resume device is mentioned in the init script in your initrd. You could check this by unpacking it, and if it is wrong, change it and repack it. Alternatively try putting a resume=/dev/sda3 on the end of your kernel command in grub.conf

Walius
24th June 2007, 11:21 PM
thanks, that way to add a line into grub.conf helped me, but is there any other way to set swap originaly...? (without any additional command lines in grub.conf)

bill_f
25th June 2007, 06:18 PM
That's where the editting of the init script and rebuilding the initrd comes in.

The one you've got was probably built for you as part of the anaconda installation process.

If your initrd script is called /boot/initrd-xxxxxxxxx.img, then you can unpack it with:


mkdir /tmp/initrd
cd /tmp/initrd
gzip -cd /boot/initrd-xxxxxxxxx.img | cpio -imd --quiet

then edit the init file at /tmp/initrd/init to change the entry with the old swap partition, then pack it up again with:


cd /tmp/initrd
find . | cpio -co | gzip -9 > /boot/initrd-xxxxxxxxx.img

It would probably be a good idea to back up the old initrd file before you start in case it all goes wrong

nulinux72
27th June 2007, 04:54 PM
The problem is not with GRUB or fstab, it lies in some config file that specifies where to store the "suspend to disk" image. I had this problem after I physically switched my sda and sdb. I haven't been able to find this file on my PC yet.

>>>>>>>device.conf
(hd0) /dev/sda
(hd1) /dev/sdb

>>>>>>>>>GRUB.conf:
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /boot/vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.21-1.3228.fc7.img
title Windows XP (5.1.2600.sp2)
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader (hd0)+1
boot
fallback 0
title memtest86+ (1.70)
root (hd0,0)
kernel /boot/memtest86+-1.70
quiet
boot
fallback 0
>>>>>>>>>>

>>>>>>>>>fstab
/dev/sdb1 / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb2 swap swap defaults 0 0
/dev/sda1 /mnt/WinXP ntfs auto,ro,user 0 0
>>>>>>>>

bill_f
27th June 2007, 10:03 PM
The config file you are looking for is called init and is built into the /boot/initrd-xxxxxxxx.img file, which is built by anaconda when you first install FC. If you unpack the initrd file, you can make amendments to the init file and pack it up again, as briefly described in an earlier post. You will find in the init script a mount statement for the root filesystem and a resume statement for swap

giulix
27th June 2007, 11:56 PM
Additionally, to limit the chance of causing an error that could cause your system to fail to reboot, you can proceed as follows:
Make a copy of the existing initrd and modify the copy as Bill suggested, thus leaving the original untouched, and create a new entry in /boot/grub/menu.lst copying your existing 'Fedora' entry, like in the following example (as root):

Existing entry (taken from my menu.lst: Yours will be slightly different)


title Fedora (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.21-1.3228.fc7.img

Existing entry + duplicate


title Fedora (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.21-1.3228.fc7.img
title Fedora_dup (2.6.21-1.3228.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-duplicate.img


This way, if anything goes wrong, you'll still be able to boot into the original initrd. If it works, you can remove the duplicate from /boot/grub/menu.lst and rename the new initrd to the old one; if not, just remove the duplicate entry and the new initrd.

Good luck! (and please don't forget to post again to report on the outcome or to ask for additional info)

nulinux72
1st July 2007, 12:22 AM
Thanks for the help, I followed the steps above and it worked.

NAC
19th November 2007, 11:58 PM
That's where the editting of the init script and rebuilding the initrd comes in.

The one you've got was probably built for you as part of the anaconda installation process.

If your initrd script is called /boot/initrd-xxxxxxxxx.img, then you can unpack it with:


mkdir /tmp/initrd
cd /tmp/initrd
gzip -cd /boot/initrd-xxxxxxxxx.img | cpio -imd --quiet

then edit the init file at /tmp/initrd/init to change the entry with the old swap partition, then pack it up again with:


cd /tmp/initrd
find . | cpio -co | gzip -9 > /boot/initrd-xxxxxxxxx.img

It would probably be a good idea to back up the old initrd file before you start in case it all goes wrong


Thank you bill, this is what i am looking for, becuase i have a same error

additionally, my hardisk is IDE not SATA, but FC8 recognises my HD is SATA, so gives me
/dev/sda7, i am sure should be /dev/hda7..
because i use same configuration for my GENTOO..

/etc/fstab (GENTOO)

/dev/hda2 / ext3 noatime 0 1
/dev/hda7 none swap sw 0 0

--------------------------------------------------------

/etc/fstab (FC8)
/dev/sda7 swap swap 0 0

--------------------------------------------------------

I am confuzed. if someone could help on this stage.
thanks a lot.

giulix
20th November 2007, 10:17 AM
Yes, you are correct. Fedora recognizes all hard disks as SCSI since F7.

NAC
20th November 2007, 11:50 AM
Yes, you are correct. Fedora recognizes all hard disks as SCSI since F7.

Thank you giulix

NAC
22nd November 2007, 03:59 AM
I got One More question.

i have extracted initrd.img file, and changed init file.

i found my fstab file's swap is sdc7 , that was wrong, should be sda7.

also in init file , i found
"resume device /dev/sdc7" (seems point to the wrong SWAP partition)

so i changed this line to
"resume device /dev/sda7" ( my current SWAP partition)

after editting, i repacked initrd.img file, it successfully worked, boot without any error msg..................

just wondering, if the "resume device" points "SWAP"? if not what does "resume device" use for?

thanks l lot

VincentLaw
26th November 2007, 03:38 PM
Hi,

I also encountered the message "Unable to access resume device" during boot time of my RHEL5.1 boxes.
I resolved this by updating my /etc/fstab file with the correct informations (I switched from LABEL=SWAP-hda2 to LABEL=SWAP) and ran the command

new-kernel-pkg --mkinitrd --update 2.6.18-53.el5
Then i made some checks by unpacking /boot/initrd-2.6.18-53.el5.img and editing the init file which was well updated with this line

resume device LABEL=SWAP

jonl02
5th May 2009, 09:10 PM
Thanks all... your legacy lives on. You solved my problem as well. The more I learn the more I wish I knew!

DukeRobillard
10th May 2009, 01:50 AM
Thanks!

The init file had both my swap partition and another partition wrong, because I changed the jumper on my boot disk to cable-select (from slave). That moved it from hdd to hdc.

(I'm using CentOS, but it's a Fedora cousin)