0

TL;DR

Is it possible to plug M.2 into a live system without blowing things up? The general consensus seems to be that M.2 is not hotswappable. But I just want to plug it in after boot.


Background

System setup

  • Motherboard: Gigabyte Z170X-Gaming3,
  • RAM: 32 GB,
  • GPU: (Some) ASUS Radeon R9-390X
  • Processor: Intel i7 Skylake (don't remember the model number but one of the very first X 4C8T models)
  • Sandisk M.2 SSD (SATA mode): Ubuntu 16.04
  • Samsung M.2 SSD (SATA mode): Windows 10, and EFI partition
  • A RAID array: To store data only, has no boot image.

Issue

I followed this answer to fix Windows being Windows (annoying) and switching the boot order so I cannot get into Ubuntu, which is my primary OS, after reboot. Now, (I think) that caused a boot manager collision in the BIOS, so my computer is stuck at the BIOS splash screen. I cannot enter BIOS setup, or do anything. It is completely non-responsive. Since this is such an edge-case, there is no help available online.

Potential Fix

My ides was to unplug the Samsung M.2 hard disk, boot into Ubuntu either from the Sandisk M.2 (preferred), or using a live USB. Then plug in the Samsung M.2, and somehow modify the Windows boot manager. I have virtualized the Windows OS in my Ubuntu OS as well (see this Q&A), so if I can boot into the Ubuntu on my Sandisk M.2, then I can simply boot into Windows through Virtualbox and fix the problem. If not, I am not too concerned, as this is a fresh install, so I can delete the boot manager, and partitions on the Samsung M.2 and reinstall OSes.

However, in doing so, I do not want to destroy the computer. Therefore, it is very important to know if I can plug the M.2 into a live machine, as my plan hinges on it. If not, can someone please give me an alternate suggestion? Note, resetting the BIOS does not work. I don't know if it is even possible to skip POST, and directly enter the BIOS where I can disable the Samsung M.2 from boot devices.

Kartik
  • 145
  • 1
  • 12
  • If you're using M.2 SATA SSDs, a better solution may be to use a USB enclosure. – bwDraco Aug 14 '17 at 18:57
  • @bwDraco, care to post your comment as answer? That's what I ended up doing. Bought a cheap M.2 to SATA converter which came with a SATA to USB cable. I booted my computer using Ubuntu LiveUSB (bless that, it did my very dirty laundry countless times), plugged in the Samsung M.2 to USB, and cleaned it out. :Sigh: That was one heck of a screw-up. Had to use the LiveUSB, because the BIOS-boot and EFS partitions were in the Samsung. :AnotherLongSigh: – Kartik Aug 15 '17 at 19:27

1 Answers1

1

As far as I can tell, M.2 is not designed for hot-plugging. The SATA standard itself is, and the SATA connector on a conventional hard drive or SSD is designed to support hot-plugging, but the M.2 connector is not.

A better solution is to use an M.2 SATA to USB enclosure. The best result I could find from a quick search on Amazon was this StarTech enclosure:

StarTech M.2 SATA to USB enclosure

bwDraco
  • 45,747
  • 43
  • 165
  • 205
  • WARNING! If you are using an M2 disk that has previously had OPAL hardware encryption activated on it, DEACTIVATE IT IN THE EXACT SAME MACHINE AND CONTEXT ON WHICH IT WAS ACTIVATED BEFORE TRYING THIS! This goes DOUBLE if you remember setting a "hard drive password" on a UEFI system, as that means something VERY different than it did for old-style BIOSes, even though the prompts often look exactly the same! This goes TRIPLE for Samsung SSDs! (ct'd) – breakpoint Dec 07 '18 at 03:44
  • (ct'd) Such passwords USED to just be one more boot hurdle at lightest, sometimes software encryption, etc. For modern drives they will set an OPAL password ON THE DRIVE CONTROLLER, but NOT THE ONE YOU ENTERED. Instead, that password will frequently be salted with details unique to the system (immutable serial number, etc.) BEFORE being given set as the OPAL password! What this means is that if you do not disable the OPAL password IN THE SYSTEM IN WHICH YOU SET IT, you stand a good chance of not being ABLE to disable it elsewhere-- because you don't KNOW it! – breakpoint Dec 07 '18 at 03:48
  • 1
    The same warning would apply to a 2.5" SATA disk with TCG Opal encryption enabled or a password set. This is not unique to the M.2 form factor. – bwDraco Dec 07 '18 at 03:49
  • The symptom is usually this: if you plug in an OPAL-encrypted drive via USB-to-SATA or M2-to-SATA adapters, you won't even see the partition table, and won't get any feedback as to the problem. Often the adapter itself will CRASH, causing you to literally not even see the bridge on the bus (e.g., not listed via "lsusb" on Linux; invisible to the Windows Device Manager). Be warned that you cannot safely mix and match ANY of the following in terms of using one to disable the other: 1) UEFI BIOS "drive passwords" 2) BitLocker (which SOMETIMES uses OPAL) 3) sedutil Use caution! – breakpoint Dec 07 '18 at 03:53