20101218 unable to access resume device - plembo/onemoretech GitHub Wiki

title: Unable to access resume device link: https://onemoretech.wordpress.com/2010/12/18/unable-to-access-resume-device/ author: lembobro description: post_id: 99 created: 2010/12/18 13:34:25 created_gmt: 2010/12/18 13:34:25 comment_status: open post_name: unable-to-access-resume-device status: publish post_type: post

Unable to access resume device

I kept getting this error on boot after making some pretty substantial changes to my workstation’s partition layout. Details after the jump.

Basically the problem was that my old swap device had lived on /dev/sda7, while the new one was on /dev/sda6. Somehow the device label, SWAP-sda7 was still stuck in my current kernel’s initrd file.

Thanks to the guys on this thread, the fix turned out to be pretty easy.

Quoting almost entirely from the above-cited thread:

1. Backup the current /boot/initrd-xxxxxxxxx.img file.

2. Unpack initrd to a working directory like /var/tmp/initrd_working with the following commands:

cd /var/tmp/initrd-working **gzip -cd /boot/initrd-xxxxxxxxx.img | cpio -imd –quiet**

3. Edit the initrd file to correct the swap device/swap device label.

4. Repack using:

cd /var/tmp/initrd-working **find . | cpio -co | gzip -9 > /boot/initrd-xxxxxxxxx_fix.img**

5. Edit /etc/grub.conf to duplicate the lines that load the current kernel.

6. Rename the first initrd line to your “_fix.img” file.

7. Reboot and let the system load that modified first initrd.

If all goes well the system should boot sans the “unable to access resume device” error. If not, you should be able to boot using your original initrd by choosing the second boot entry displayed by grub.

Copyright 2004-2019 Phil Lembo