3

My laptop came with Windows 10 pre-installed using UEFI and Secure Boot on an SSD, the Windows drive encrypted with Bitlocker. I pulled that SSD and installed Ubuntu on a new SSD.

I bought an external SSD enclosure with a USB-C interface and installed the original Windows SSD into it. If I attach this drive to my USB-C port, turn on the power and go to the BIOS boot options menu, the laptop gives me the option of running the Windows boot manager on the (now external) SSD. When I select the Windows boot manager, Windows tries to boot but fails after a few seconds with a BSOD and en error "Inaccessible boot device". This is a pretty generic error and from my research may have many causes, but I think the issue is that the drive location has changed and something in the boot configuration needs to change in order for me to boot Windows 10 from this device in the external enclosure.

I've looked at the BCD Boot options, but I don't have much experience with Secure Boot, UEFI, etc., and I was hoping someone could point me in the right direction to get the configuration updated so I can boot Windows when I need it.

Robert Munn
  • 131
  • 3
  • It's the driver loading that is tricky. – Tom Yan Dec 25 '19 at 13:19
  • **It is _not_ recommended to run any OS, let alone Windows, from a USB connection**, as you risk data loss when the USB plug is eventually bumped, either on the laptop or the enclosure _(it's not a matter of if, but when)_. The recommended way to do this is to dual boot off _internal_ drives... is there a reason you're not wanting to do so? _(AFAIK, Windows does not, and has never, support[ed] running the full OS off a USB drive)_ – JW0914 Dec 25 '19 at 14:03
  • @JW0914 Yes, I realize that's a better option, but I don't have a second internal SSD slot. I might just buy a new Windows 10 Pro license and install it alongside Ubuntu on the new SSD, but I'm trying to get this running in the meantime since I already have a perfectly good Windows install on the existing drive. FWIW, USB-C at 10 Gbps is plenty fast. I've successfully run VMs off of older USB SSD drives. – Robert Munn Dec 25 '19 at 15:26
  • Why does one internal disk prevent dual-booting _(unless it's only a 128GB SSD; and Windows licenses are tied to the motherboard, not the disk drive)_? The USB-C protocol is _capable_ of a maximum 10Gbit/s, but that is not the throughput you will get for several reasons: (1) throughput is dependent on the controller on the motherboard; (2) Laptops, generally, do not have a dedicated controller for every USB port [each port shares the same controller], which means the available throughput is halved for every USB device connected. _Windows has never supported full OS booting from a USB drive._ – JW0914 Dec 25 '19 at 15:36
  • @JW0914, See my earlier comment. Cloning the partitions on the old drive to the new one is possible, but I've had enough issues cloning drives that I thought this might be the easier route. Apparently not, though. – Robert Munn Dec 25 '19 at 15:53
  • You're cloning issues result from using 3rd party solutions instead of the native Windows' solution of `DISM`, which never results with the issues 3rd party solutions always have. See the [Imaging](https://superuser.com/a/1503102/529800) section. **If something is worth doing, it's worth doing right the first time around.** You're trying to get Windows to work in a way Windows has _**never_** supported _(Microsoft tried running a watered-down, minimalist OS in Windows 8 with Windows-to-Go, then abandoned it, but **Windows has never supported running the full OS off a USB drive** [3x now])_. – JW0914 Dec 25 '19 at 16:01
  • If you're insistent on using Windows from a USB drive, the only stable solution is [WinPESE](http://win10se.cwcodes.net/), which builds a GUI within WinPE; however, the best solution is to either resize a partition on the Windows SSD to make room for an Ubuntu partition, or image each partition on the Windows SSD using `DISM` _(commands under Imaging link in my prior comment)_, create the required partitions on the Ubuntu SSD (4 in total: WinRE, EFI, MSR, OS - in that order), then apply the images for the WinRE, EFI, & OS partitions to their respective partitions, following steps in the link. – JW0914 Dec 25 '19 at 16:16
  • @jw0914 - Windows to go is not a *"watered-down, minimalist OS*". If you check this technet article you can see it is the **full** os that is applied: https://social.technet.microsoft.com/wiki/contents/articles/6991.windows-to-go-step-by-step.aspx. Windows runs fine from usb as long as your pc firmware can see the bootloader. Mostly everything on external drive is ok but I have an old mac that will only boot Windows from external USB if the bootloader is on the EFI partition on internal disk. Just needs testing. – lx07 Dec 27 '19 at 16:06
  • @lx07 Windows-to-Go does not allow accessing the same features that are available to Windows installed to a HDD/SSD... I don't recall what features are not available, as I upgraded to Windows 10 years ago, but one thing I was able to quickly find is [Windows To Go: Feature Overview](https://docs.microsoft.com/en-us/windows/deployment/planning/windows-to-go-overview#differences-between-windows-to-go-and-a-typical-installation-of-windows)... I distinctly remember reading years ago about more differences in several articles, but it's not worth it to me to re-investigate. – JW0914 Dec 27 '19 at 16:23

2 Answers2

1

you just need to set HKLM/SYSTEM/HardwareConfig/{..guid..}/BootDriverFlags = 0x14 - these BootFlags correspond to CM_SERVICE_USB_DISK_BOOT_LOAD + CM_SERVICE_USB3_DISK_BOOT_LOAD.

gordy
  • 193
  • 7
  • I am in the same situation as the OP and this did not change anything. BTW I managed to access reg.exe via a command prompt in the Advanced recovery of windows. The value of BootDriverFlags vas 0x1c, setting it to 0x14 did not change the situation. – ggll Nov 26 '22 at 12:26
-1

Just tried the answer above with setting HKLM/SYSTEM/HardwareConfig/{..guid..}/BootDriverFlags to 0x14 and it worked perfectly.

Note that 0x14 is a Hexadecimal value and is equal to 20 in Decimal

My install had 2 GUID values and so changed in both. Worked like a charm & Windows booted up as if nothing changed.

Troubleshooting a disappearing disk issue and need to isolate the inbuilt SATA controller. As I donot have the rep to upvote the above answer or add a comment to it, just adding this +1

  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://superuser.com/help/whats-reputation) you will be able to [comment on any post](https://superuser.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1195308) – Blind Spots Jun 18 '23 at 04:02
  • Don't care. The purpose of me adding the answer was to help anyone who stumbles upon this question. They will see the right answer with a comment saying it doesn't work. Which is not at all true. – user1270949 Jun 19 '23 at 17:48