📜 ⬆️ ⬇️

Bootable HDD - Configuring auto-dial drives in Windows To Go

Not so long ago, by chance, I learned that Windows can be installed and run from an external USB drive. No, not that I didn’t know about it at all - nobody canceled Windows PE. But I did not know that there was a solution right out of the “box” and called Windows To Go, although this solution was implemented only in the “box” on which Windows Enterprise is written.
After a simple installation, we get bootable media in Windows, which has minor restrictions. For the purpose of security created in this way, the media in any Windows is not automatically mounted (it is not assigned a letter), i.e. it is not available to the regular user. And also when booting from such media, the internal disks of the computer are not visible, since they are disabled (the “Offline” internal drives mode).

It all started with the fact that I replace my 1Tb 3Q Caynam purchased 2Tb Seagate Backup Plus. The trick of the acquisition is trivial - there was not enough space for backup at work on the old media. I liked the new hard drive because it is almost 2 times smaller (it fits in the palm of your hand, easier and, of course, also USB 3.0. The old hard drive was pulled out of the box and the laptop was strengthened at its expense. I left the box - all the same The all-aluminum casing is now a rarity and it can obviously be adapted somewhere.

Now I have a lot of place, even in abundance. And, remembering the mobile Windows, I thought - why not try what happened there at Microsoft. I downloaded the image of the desired OS - there should be only Windows Enterprise, installed the OS in the virtual machine and, having connected an external disk, launched the wizard from the control panel. After a bit of torment Windows reported readiness. Having rebooted right into the virtual machine, I saw the Windows 8.1 boot - the OS booted. Having completed the work, I restarted the real computer already, choosing to boot into the external drive. Windows booted. For some reason I was a little surprised :)

During the installation of Windows To Go, the media is divided into two sections - 350Mb FAT32 for the bootloader and the rest of the space for the OS. I reduced the second section to 100Gb. Then I created another partition on 100Gb and formatted it in ext3 (debian or mint will live here) and the rest of the space was allocated for the connection.
')
When I installed this whole thing, I already thought about it - it would be nice if the partitions with Windows To Go were not mounted on normal Windows systems. In order to avoid so to speak. Sections with Linux will not be mounted anyway. And here it turns out instead of a single disk as many as three - a hodgepodge. But it turned out that everything was provided to Microsoft and the disk on which Windows To Go is installed is not automatically mounted on other Windows systems.
After loading Windows To Go it turned out that the internal disks in the computer are not visible. Their status was Offline. Microsoft took care of us, poor users, who, as it were, didn’t accidentally break anything.

Then I abandoned this business, as I worked hard.

After a while, at work at a friend's “Windows broke” for some trivial reasons: whether he accidentally demolished something in the Program Files folder, or in the Users folder, or in the Windows folder — I did not fully understand but I feel that Bill Gates is clearly not in the business here and the call of Windows Must Die is clearly not the topic. So here. We booted from my hard drive. The first installation on the new hardware is longer than the others, since hardware configuration is determined and configured, the following loads are already regular. Everything was loaded, everything is great only ... there are no hard disks. The matter is simple - in the disk management snap-in, we transfer disks to the “Online” mode (right-click on the disk) and assign a letter to the sections. After copying the information, it was necessary to copy it to another computer - connect the USB HDD to the computer and no reaction - again diskmgmt.msc and go ...

And after this incident, I realized that these restrictions are not convenient. If I make myself an autonomous system exclusively for my tasks and I do not need to quickly connect through this device to other machines, then everything is fine, because I get a narrow device for a specific task. But if I have this solution as a trick to my data carrier , then this is inconvenient.

So, there are two problems:
- automounting of disks, preferably only a data partition;
- Download Windows To Go with mounting all available data devices.

Googling and poyandoksiv on the Internet, I did not find a solution. Those. I did not find what needs to be done, where to put a tick or what command to enter. Enriched with a lot of information - yes, but only. Several times I got steadily from a link to the Microsoft technical support website , but the solution was not deployed there either. In such cases, I am sad. Because or everything is very simple and you need to look for some admin that he would explain because I do not understand the elementary thing, or everything is worse, because the problem is individual and you have to figure it out for yourself and not the fact that you will understand. I had to think)

On the above tech support page, we thoughtfully read the text and cling to the NoDefaultDriveLetter attribute. Obviously this attribute determines whether a letter should be automatically assigned to a section. This attribute can be changed through the utility diskpart.

Run the utility in the Windows To Go command line: diskpart

Further we work with the diskpart console.

Display the list of volumes: list volume

Displays a list of volumes in the system. I know that my external hard drive after cutting 200Gb now "weighs" 1600Gb and I easily recognize it. Suppose my section has a “lucky” number.

Choose your partition (set focus on it, if expressed in terms of diskpart): select volume 13
List disk attributes : attributes volume

And we see the parameter “No drive letter by default: Yes.” Aha

Remove this attribute from the selected volume: attributes volume clear nodefaultdriveletter

List disk attributes : attributes volume

And we see the parameter “No drive letter by default: No”. Yep

One issue resolved. Unfortunately, letters will now be automatically assigned to all available sections of our disk. This is because it is marked up by the MBR. If the disk were marked up with GPT, then it would be possible to manage individual partitions. But with GPT, I may have problems with loading on those machines where there is no UEFI, so this is the only way.

The next question is solved by the same utility :)
For connecting external media is responsible for the policy SAN - Storage Area Network. Unfortunately, nothing sensible, I could not find how to manage it. Often I came to this Microsoft support page . However, carefully reading the help to diskpart, I saw the SAN parameter. Oh how!

Enter in the diskpart console: san

And we see "Autonomous internal disks." Aha

Enter: san policy = OnlineAll

Check mode: san

And we see "Translation of everything into standing" in the network "." Yep

Exit the console: exit

All is ready!

PS
I do not think that my article will be directly super-useful to the community and I suppose that there will be those who will reasonably notice something like "Well, I entered two teams and ran to write on Habr - where the world is heading, Habr is not the same." This is all true.
However, I remember how I left Linux on the Internet and the article and just repeated. And I did it! And while I was crawling in the evening on the Internet, I remembered those times - when I didn’t know anything at all ... sometimes I wrote such nonsense in the console =) So I wrote this little article for one purpose - if someone searches, let him also succeed.

Source: https://habr.com/ru/post/239233/


All Articles