You are not logged in.

#1 2015-10-27 05:42:34

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Make USB Removable -> Fixed Disk

TL;DR : How do you "flip the bit" of a USB Drive to make it be seen by Windows as a "Removable" or "Fixed Disk" under Arch, or really any Linux distro?  I can't seem to find any Unix instructions, only Windows apps.


More info...

So, the latest versions of Windows Server 2012 R2 have an install.win file that is larger than the 4GB barrier of Fat32.  This makes the typical ISO-as-USB-Boot-Device process obsolete.

There are two solutions:

* Break up the install.win file into sub-parts.  Requires the WinPE package installed and a whole lot more Windows than you care to do.
* Create UEFI bootable USB drive: EFI partition as Fat32, and the data partition as NTFS.  This requires a "Fixed Disk" USB drive to create multiple partitions (at least for Windows to recognize.

I found this Windoze tool:

http://www.getusb.info/flip-your-bit-us … cal-drive/

This effectively "flip the bit" on my 16GB drive, changing it from "removable" to "fixed disk" and I was able to create multiple partitions!

Obviously, using Arch as my primary OS though, I'd love to know how to do this in Arch.  I can't seem to find any Linux documentation on this procedure though.

Thanks!

Offline

#2 2015-10-27 07:15:31

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Make USB Removable -> Fixed Disk

Doing that could be tricky: for what I know the Removable Media Bit should be the 7th bit of the first byte the disk (not personally tested) so in theory you should be able to manually flip that bit, however many devices have the bit hardcoded within the controller (for example, the controller sends 0bX1XXXXX when you request a read operation on the first byte). Linux doesn't really care of that bit and any "removable media" is treated like other storage devices. Windows on the contrary care of it, but this should not prevent you to create multiple partitions...


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-10-27 08:54:25

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Make USB Removable -> Fixed Disk

What mauritiusdadd says is correct, you would need to somehow fiddle with the firmware of the flash drive if that is not defined directly in hardware.

Some things along the software stack on linux will behave differently if that bit is set or not, the one that comes to mind is udisks, but generally linux doesn't care about that and a disk is a disk.

The utility that you have found most probably does some registry trick, have you checked with linux that the removable media bit was actually changed?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2015-10-27 11:38:42

Silkworm205
Member
From: UK
Registered: 2012-05-21
Posts: 267

Re: Make USB Removable -> Fixed Disk

I've managed to make bootable USBs of Windows 7, 8, and server R2. What I had to do in each case was (From within Arch):
Format the drive to fat32, then launch Unetbootin Check that the USB you want to use is listed.
While it's running, unmount the drive, format it as NTFS, then remount it.
Then tell Unetbootin to use the drive and Windows ISO.
Unetbootin seems to refuse to use NTFS partitions, but only checks on launch. The syslinux install will fail at the end, leaving Windows' own boot loader in tact.

Last edited by Silkworm205 (2015-10-27 11:39:18)


I think I know enough to know I don't know enough.

Offline

#5 2015-10-27 15:33:08

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Make USB Removable -> Fixed Disk

If you have access to a running windows machine (even a virtual machine will do) then this [1] might be of some help. I've had to use this method before because the tool provided by MS didn't work.

[1] http://www.instructables.com/id/How-to- … /?ALLSTEPS


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2015-10-27 22:06:50

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: Make USB Removable -> Fixed Disk

Thanks guys!  I'll do a bit more research as this has pointed me in a decent direction (7th bit).

R00KIE wrote:

If you have access to a running windows machine (even a virtual machine will do) then this [1] might be of some help. I've had to use this method before because the tool provided by MS didn't work.

[1] http://www.instructables.com/id/How-to- … /?ALLSTEPS

Actually, those steps creates an MBR which is not UEFI (sorry, should have mentioned that my server only boots UEFI partitions - very annoying).

I've actually blogged about the exact same thing:

http://eduncan911.com/blog/archives/cre … ndows.html

You don't have to create that MBR as xcopy will do it for you if copied from root (as I show in my link above).  smile

Offline

#7 2015-10-28 13:05:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Make USB Removable -> Fixed Disk

If you do find a way to permanently change that 7th bit I would also be interested(1), I've searched about it before but came up empty handed on something generic that would work for all (or most) drives, I was particularly interested in forcing that under linux but no luck there. On the other hand I think modern external drives should identify themselves as internal drives[1].

[1] https://aussiestorageblog.wordpress.com … fts-fault/
(1) There are some tools specific to certain brands but nothing that would work for most drives.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2015-10-28 14:16:16

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: Make USB Removable -> Fixed Disk

Well, I came up empty handed as well.

I did find out that my version of the Windows application Rufus USB (open source btw) was several years old.

They now have a 2.5 version that was able to:

1) create GPT partition table (efi boot)
2) format for ntfs and copy the > 4GB file as-is
3) set the nrfs partition to active/boot flag.

Worked like a charm. 

I was on the verge of doing all this myself with my Arch install, just like the Begineer's guide instructs us on what steps to do.

What I'm surprised to find out is I didn't need a fat32 partition for EFI boot.  I'm thinking it created a MBR with the bin file sitting on the ntfs partition itself.  Hence why Windows bootloader was able to read it.  But how the EFI BIOS saw it, I am not sure...

Anyhoot, it worked.

Offline

#9 2015-10-28 14:17:35

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: Make USB Removable -> Fixed Disk

Oh, I should note that the "bit flip" only worked when I had a partiton.  Once I cleaned the drive, it lost the bit flag. 

Something to note for others.

Offline

Board footer

Powered by FluxBB