How do you partition a USB Thumb / Flash Drive?

39

13

Out of the box, Windows will not allow you to partition a USB Thumb / Flash Drive. How can you do this?

In case anyone is wondering Why you would do this?

It's interesting in the case of a BitLocker ToGo drive where you can take a large thumbdrive (like 4 or 8 GB) and format a small amount of the drive to be used normally as a Fat32 drive and leave the remaining partition encrypted using BitLocker. This allows you to keep some non secret data on the unencrypted partition(like portable apps).

Omar Shahine

Posted 2009-05-04T15:36:36.967

Reputation: 2 409

@OmarShahine : I have a first partitions in NTFS and a second one in ext4. MAIN Problem : windows only see the ext4 partition! – user2284570 – 2014-09-10T23:15:23.407

4Windows will recognise the first primary partition ONLY. If there is no primary partition, it will recognise the first virtual/extended partition ONLY. Source: Partition Master version 10 (pops up a warning when trying to create a partition on a removable drive that is smaller than the total size of the device) – kurdtpage – 2016-01-25T07:07:38.617

3The fact he is asking about bitlocker tells me that its windows. – Mark Broadhurst – 2013-10-21T09:36:52.003

Answers

50

It can be done with a command line tool called diskpart

The steps (on Windows 10) are as follows:

  1. Click the windows icon
  2. Type cmd (do not hit enter)
  3. Right click the 'Command Prompt' option (it was the first option for me), select 'Run as administrator' and click 'Yes' on the confirmation popup
  4. Click into the 'Administrator: Command Prompt' window, type diskpart and hit enter (be careful from here on - you are doing low-level things to your drives and could delete your main drive if you're not careful)

  5. You should see a DISKPART> prompt. Type list disk and hit enter. You'll get a list of drives back - you want to find the USB drive. It will probably be much smaller than your main drive. I'm using my system as an example - yours will probably be different so you're going to have to work out which drive is the USB drive. You don't want to get this wrong! If you are in any doubt, seek help from a more technical friend. You can destroy your data if you get it wrong!

For example, on my system I see:

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online         1863 GB    10 MB        *
  Disk 1    Online           58 GB      0 B        *
  1. The USB drive in my case is Disk 1 (I have a 64Gb drive, 58 is close enough!). It's clearly not the 1863Gb Disk 0, that is my main Windows drive. I don't want to go anywhere near that one!

  2. Now I want to select disk 1 and hit enter (It might be 2 or another number on your system. Almost certainly NOT 0.)

  3. Now type list partition [enter] and you'll see the partitions on your USB drive.

  4. I had a 200Mb EFI partition that I wanted to delete. It was partition 1 so I did select partition 1 [enter]

  5. The EFI partition on my drive was protected, so when I tried to delete the partition, it failed. The command to force it is delete partition override. This will delete the selected partition. Note: I had to use the help system to figure this out: help delete partition [enter] gave me what I needed.

  6. Once you've deleted the partition(s), you can go back into Disk Management and reformat / repartition the drive with the nice GUI :)

You can see all the diskpart commands by typing help [enter]. There's a lot there, but I prefer to do as little as possible in diskpart and then go back to the Disk Management GUI.

Darren

Posted 2009-05-04T15:36:36.967

Reputation: 601

3Thanks, but I can't create a 2nd partition using the GUI. After I create the first partition (using half the disk space), when i right click the unallocated are, the "new volume" options area ll greyed out – Zain R – 2017-02-21T22:51:21.813

works on Windows 7 as well :) – Zathrus Writer – 2017-04-09T11:06:52.890

you can add partitions with create partition [type] where [type] is the type of partition you want-- logical for a new volume, primary if you're working with an unpartitioned (i.e., blanked using diskpart's clean) disk, efi for, well, efi. You can then select the newly created volume and format it with format fs=[format type] label="[label name]" quick. – j4eo – 2018-04-18T04:01:50.160

8

Out of the box, Windows Vista/7 allows the partition of an USB drive. The command is diskpart.

user4553

Posted 2009-05-04T15:36:36.967

Reputation:

Check here for more info, it really worked for me: https://support.microsoft.com/en-us/kb/300415

– codepleb – 2015-09-12T16:40:19.083

10Answering your own questions is encouraged. It helps create a complete database of solutions here. – Brent – 2009-05-04T15:58:35.510

2You can't partition a USB drive that's marked as removable, it requires removing the removable bit first. diskpart won't partition a removable drive such as most USB thumb drives, hence my question – Omar Shahine – 2009-05-04T17:14:23.237

4I am not sure what Windows version you are using, but I have no problems using diskpart on Windows Vista/7 to partitioning flash drives (diskpart, select drive, clean, create partition primary, select partition #, active, format, assign, exit) – None – 2009-05-04T18:53:58.957

5

The problem

Contrary to Linux, Windows cannot partition or properly use a partitioned (USB Flash Drive) UFD; that is, if you plug a partitioned UFD, only the first partition will be visible.

The solution

The solution should address two problems: partitioning and make partitions visible. As for the first, an option is to use Linux, perhaps a live distro specifically targeted to imaging and partitioning, like Clonezilla. There are also free Windows tools like Bootice.

The second task is to make all (not only the first one) usable in Windows. A discouraged option is to use tools flipping the removable media bit, as they can damage incompatible sticks.

A better way is to install a filter. A program similar to a drive, adding extra functionality to them. In our case making an UFD appear as fixed drive. See for example Karyonix diskmod.sys discussed on reboot.pro.

Side effects and alternative uses

Since Windows can see only the first UFD partition without a filter, one can make some Linux files invisible to a Windows user, by storing them on a partition other than the first.

A special case is a pen Linux distro. If you want to use the pen for storing documents too and you don't want in Windows to make Linux OS files visible, simply do not install the Linux on the first partition.

antonio

Posted 2009-05-04T15:36:36.967

Reputation: 647

sorry but what is "UFD"? – Tomofumi – 2017-03-28T02:25:02.163

@Tomofumi: Fixed in text! – antonio – 2017-03-30T09:54:13.530

4

Windows must be able to recognize the flash drive as a "fixed disk."

This is accomplished by either flipping the removable bit (which doesn't always work), or modifying the cfadisk.c, and .inf files, assuming you're on XP. (You must know how to code for the latter.)

s1los

Posted 2009-05-04T15:36:36.967

Reputation: 41

Hello, Care to elaborate? Or at least give a reference. – Alex – 2015-12-06T00:10:48.347

1

I am coming from a linux perspective, so I would just use cfdisk or if you like a gui, gparted.

You could keep a live CD such as Ubuntu handy for doing these sort of things. Just boot from the CD, do what you have to do, reboot to windows. (it's also great as an emergency rescue solution)

Brent

Posted 2009-05-04T15:36:36.967

Reputation: 141

1

You can use Windows cmd.exe: run it as administrator and use console utility diskpart.exe to partition the drive. Manual: http://ss64.com/nt/diskpart.html

Valentina Walx

Posted 2009-05-04T15:36:36.967

Reputation: 19

I don't think this answer the question: DISKPART> create partition primary

No usable free extent could be found. It may be that there is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't specify either to create the maximum sized partition. It may be that the disk is partitioned using the MBR disk partitioning format and the disk contains either 4 primary partitions, (no more partitions may be created), or 3 primary partitions and one extended partition, (only logical drives may be created). – Florian Bidabe – 2016-06-23T03:58:40.660

0

Another answer: Put one or more virtual hard drive (VHD) files on the drive and mount them if you need a different file system. In Windows, the Disk Management tool has the ability to attach VHD files as physical disks, so that a VHD file can be accessed just like a physical disk.

jortony

Posted 2009-05-04T15:36:36.967

Reputation: 21

But will windows be able to natively mount something like an ext4 vhd? – jiggunjer – 2016-02-02T10:44:46.510

Windows should be able to mount the drive, but will not be able to read the partition; at least not without a 3rd party tool. I have used http://www.ext2fsd.com in the past, which essentially makes Explorer have native ext2/3/4 filesystem support, to great success.

– Joshua Parnell – 2017-02-06T20:54:49.870

0

Out of the box, Windows will not allow you to partition a USB Thumb / Flash Drive. How can you do this?

This is an old thread.

The above is not the case on Windows 10.

On Windows 10 (and perhaps earlier versions) both diskpart.exe (command line) and diskmgr.msc (GUI) will let you create multiple partitions, and format volumes, on USB drives.

Jonesome Reinstate Monica

Posted 2009-05-04T15:36:36.967

Reputation: 1 680

0

One way to do this is using a tool called BootIt. this tool removed the removable bit on the thumb / flash drive and allows you to partition the drive.

I'm sure there are better ways to do this, but this is the only one I can think of.

Omar Shahine

Posted 2009-05-04T15:36:36.967

Reputation: 2 409

Essentially, removing the removable bit is what it would take. However, the link you posted does not find the BootIt tool. – Alex – 2015-12-06T00:11:58.510

Here's a new link: http://www.tipsdotcom.com/lexar-usb-format-download.html

– jonincanada – 2016-03-04T12:37:33.983

-2

Just use your favourite partitioning tool - Either Disk Management on Windows, or Gparted on *nix, or other - They should all understand USB flash drives, and you simply partition as if it was any other hard drive.

William Hilsum

Posted 2009-05-04T15:36:36.967

Reputation: 111 572

1This is wrong! Linux does not have this limitation, but Windows will only be able to see the first partition. – antonio – 2014-08-07T23:19:52.343

5downvoted: information is wrong in case of windows. windows disk management ui does not let you change partitions on a usb flash drive. (it does show them, you can delete a partition, but cannot create a new one, or extend/shrink/etc) – Tuncay Göncüoğlu – 2014-10-08T10:43:44.260

4Disk Management on Windows 7 doesn't seem to repartition, though diskpart as mentioned in another answer does. – paulmorriss – 2013-03-08T09:21:50.923

6The Windows disk management tool disables these features for removable flash drives. – Michael Steele – 2013-08-23T22:08:52.110