Skip to content

[Solved] “A required device isn’t connected or can’t be accessed” after cloning

Table Of Contents
show

Whaddya mean, ‘can’t be accessed’? It’s right there!

(Side note: I wrote this post in emacs, using org2blog. It was an interesting experience, which I may go into at another time.)

Context

I wanted to move my OSes to a different drive. All told, this ended up taking around half a day!

The NVMe slot on the motherboard was behind the graphics card, which had a pretty inaccessible release catch.
After that, I had to repair boot from an Arch install USB. Then X wouldn’t start as the PCI device had changed.

Moving Linux to the NVMe was fine, but Windows complained, bitterly. Booting from the NVMe with the old install
on the SSD still attached just booted the SSD install. Disconnecting the SSD caused a bluescreen (0xc000000e) with “A required device isn’t connected or can’t be accessed”:

Recovery

Your PC/Device needs to be repaired

A required device isn't connected or can't be accessed.

Error code: 0xc000000e

You'll need to use recovery tools.

My guess is that references to the older drive remained in place. Trying to boot with both copies still present on
each drive — I like to make sure I can boot the new one before removing the old one! — may have exacerbated the
problem.

I was able to use a repair USB to install the necessary boot files on the Windows, after which I could boot from
that partition directly from the EFI boot menu or (later) by creating a manual GRUB entry (/etc/grub.d/40_custom) pointing to that partition via UUID.

Steps to repair

Note that this is what worked for me, in the context of a Windows install on a partition (and the EFI &
Recovery partitions) that had been cloned to another drive. If Windows is complaining for a different reason,
your mileage may vary.

I eventually got Windows to boot correctly — ie via GRUB handing off to the boot manager on the EFI partition —
after about two thirds of a day (!) by:

  1. Deleting BCD on the EFI parition
  2. Booting a repair disk (created in a Windows 10 VM)
  3. Using diskpart + list volume to find the EFI partition
  4. Assign the EFI partition a drive letter (M:)
  5. bootrec /scanos to find the Windows drive (H:)
  6. bcdboot H:\Windows /s M:
  7. Reboot
  8. Still bluescreen!
  9. Boot Windows using the manual custom GRUB entry that points directly at the partition
  10. Now booting from the EFI partition actually works (..??!)

I’m not 100% sure that the last two steps are what sorted it, but I think Windows keeps boot things (BCD, etc)
updated, and by actually booting Windows, it figured out the right references and wrote those to the BCD. Maybe.

This was a frustrating experience, as migrating to another drive shouldn’t take that long, but a useful one as similar things would presumably happen if I had to restore from backup (I have both borg images of the partitions and a clonezilla image of the drive).

1 thought on “[Solved] “A required device isn’t connected or can’t be accessed” after cloning”

  1. Pingback: PSA: Wyse 7020 Only Boots Ubuntu 22.04 In Legacy Mode – Rob's Blog

Tell us what's on your mind

Discover more from Rob's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading