Unable to access resume device in CentOS

5,871

While changing box, it is highly likely that your disks no longer have the same device name as viewed by Linux. This could be because the driver is a different one, or they are just numbered differently. In any case, the disk that used to be /dev/hda may now be /dev/sdb, or something else.

You should boot the new box on a rescue CD (live CD, any distro will work). Then, check how your disks are detected, find their new names, so you can update your configuration.

First, you'll need to update GRUB's config. GRUB does it's best to use "independant" disk names, such as (hd0) and (hd1), but it does map these to real device names in the file /boot/grub/device.map. Update this to be correct for your new box, and rewrite grub to both your disks, using the grub command:

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)

Then, check that /etc/fstab and /etc/mdadm/mdadm.conf don't contain any references to your raw disk names. Swap partitions are a frequent culprit, if you didn't put them in a RAID partition.

Reboot, and you should be going! Well, hopefully. Hope this helps.

Share:
5,871

Related videos on Youtube

SyRenity
Author by

SyRenity

Updated on September 17, 2022

Comments

  • SyRenity
    SyRenity over 1 year

    I moved my CentOS soft-RAID1 drives to another box, and now it fails to boot.

    When I launched the boot process from the grub menu, I get the following error:

    "Unable to access resume device /dev/md1".

    (I should notice that before that I got another error related to super-block, which was fixed by re-running the mkinitrd).

    Any idea?

  • SyRenity
    SyRenity about 14 years
    Hi. Thanks for the advice. About this bit: " You should boot the new box on a rescue CD (live CD, any distro will work). Then, check how your disks are detected, find their new names, so you can update your configuration. " I just checked out, and the disks are detected in same fashion - i.e. /dev/sda and /dev/sdb are same on both machines (as I'm using SATA drives). Is there any chance the partitions got changed? Or there anything else I can do? Regards.
  • poldek
    poldek about 14 years
    No, it's not possible for the partitions to have been renumbered. It is possible that your installed kernel doesn't detect the new SATA controller. Is the live CD you used considerably newer that the installed kernel? What stage does the error occur at? Does GRUB start booting at all, or just fail immediately?
  • SyRenity
    SyRenity about 14 years
    Actually the installed kernel is newer then Live CD, because it's the last before the latest available, and the Live CD contain one a few versions ago. The error occurs immediately after the boot stage - GRUB just writes "Unable to access resume device /dev/md1", shows it's unable to mount the root devices, and then kernel panic arrives. It's important to notice that before that I had an error "Superblock not found", which occurred because the SATA controller was not in initrd image. I solved this by installing the latest kernel via Live CD (mkinitrd just didn't solve it). Thanks again.
  • poldek
    poldek about 14 years
    Yes, I saw you regenerated the initrd image, always a good move. My last idea would be to try booting with the "noresume" parameter to the kernel (edit the boot line in grub, with the 'e' key).