Using Diskpart to create a bootable USB flash drive

Page 1 of 2 12 LastLast

  1. Posts : 985
    Windows 10 Home 21H1
       #1

    Using Diskpart to create a bootable USB flash drive


    Hi All,
    Ive decided to use Diskpart to create a bootable USB flash drive instead of using the Media Creation Tool to create the Windows 10 media. Im just going to use the Media Creation Tool to download the iso image and diskpart to prepare the flash drive.
    Are the following commands correct? In particular is it OK to put the Active command before the format fs=fat32 command?
    You'll notice that Ive omitted "quick" from the format command. Is that the right way to do a Full Format?
    I would prefer to perform a full format on the USB flash drive so that it checks for errors at the same time. I just want to know that performing a full format after the Active command wont interfere with the Active command in any way.
    Ive also left out Assign. Am I correct in thinking that Assign isn't necessary because Windows will automatically give the flash drive the next available drive letter which is what I want to happen?

    diskpart
    list disk
    select disk #
    clean
    convert mbr
    create partition primary
    select partition 1
    active
    format fs=fat32
    exit

    Many Thanks
      My Computer


  2. Posts : 4,453
    Win 11 Pro 22000.708
       #2

    https://docs.microsoft.com/en-us/win...sb-flash-drive

    I've never had to use the "convert MBR" command.

    The link above formats as NTFS, but you need to use FAT32 to make the drive bootable from the UEFI.

    I believe that marking the partition as "active" is unnecessary with a UEFI system.

    In fact, using Diskpart is probably unnecessary. Just do a quick format of the USB drive as Fat32, mount the .iso (which can be done natively under Window 8, 8.1, and 10), and copy all of the contents of the .iso to the USB drive.
      My Computers


  3. Posts : 31,651
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    bobkn said:
    I've never had to use the "convert MBR" command.
    It's a useful precaution in case the usb has previously been used with Rufus and ended up as GPT.

    I believe that marking the partition as "active" is unnecessary with a UEFI system.
    In fact, using Diskpart is probably unnecessary. Just do a quick format of the USB drive as Fat32, mount the .iso (which can be done natively under Window 8, 8.1, and 10), and copy all of the contents of the .iso to the USB drive.
    That would do if you only ever want to boot on UEFI systems. The Diskpart method produces a usb that is identical to that made by the MCT and will boot on all systems, Legacy and UEFI. I have both, so I always use Diskpart.


    @sportsfan148, yes, the Active command and the format are completely independent commands and have no interaction with each other. You can use them in either order.

    I would recommend a quick format. A full format will write to every location on the usb and may reduce its life.

    You are correct, Assign isn't necessary.
      My Computers


  4. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #4

    Bree said:
    It's a useful precaution in case the usb has previously been used with Rufus and ended up as GPT.



    That would do if you only ever want to boot on UEFI systems. The Diskpart method produces a usb that is identical to that made by the MCT and will boot on all systems, Legacy and UEFI. I have both, so I always use Diskpart.


    @sportsfan148, yes, the Active command and the format are completely independent commands and have no interaction with each other. You can use them in either order.

    I would recommend a quick format. A full format will write to every location on the usb and may reduce its life.

    You are correct, Assign isn't necessary.
    Thanks again for your help Bree.
    Like you say I use the convert mbr command just as a precautionary measure. I have used Rufus in the past but I stopped using it for exactly that reason because I don't like the way it partitions the flash drive in GPT format.

    The only reason I was thinking about using a Full format instead of Quick is for the reassurance that the flash drive isn't full of bad sectors or has any problems before I set it up as my bootable Windows 10 media. Im presuming a Full Format would pick up on any issues on the flash drive whereas a quick format wouldn't flag up any possible errors etc.

    On another point Bree. Just out of curiosity..is it also possible to use Disk Management to prepare the flash drive? You would have to Clean the drive and Convert MBR using Diskpart first. Then switch to Disk Management to create a New Simple Volume and format etc. Then finally go back to Diskpart to make the partition Active. To do that would these be the commands?
    diskpart
    list disk
    select disk # (enter flash drive number)
    list partition
    select partition 1 (this would be the only partition on the drive)
    active
    exit
    Last edited by sportsfan148; 15 May 2019 at 12:42.
      My Computer


  5. Posts : 4,594
    Windows 10 Pro
       #5

    NavyLCDR is a wiz with this stuff, hopefully he`ll see your post.
      My Computers


  6. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #6

    AddRAM said:
    NavyLCDR is a wiz with this stuff, hopefully h`ll see your post.
    Thanks mate. Yeah I know how knowledgeable Navy is. He has helped me a lot in the past
      My Computer


  7. Posts : 4,594
    Windows 10 Pro
       #7

    I`m not sure but I don`t think it has to be marked Active if you`re just gonna make an installer.

    I used my USB installer to download Game of Thrones Season 5 for my daughter so I can`t check. LOL
      My Computers


  8. Posts : 15,037
    Windows 10 IoT
       #8

    I use diskpart to create my install drives, and use the active command. Depending on what that drive was prevously used for I may do a clean all. Like for instance if it was used to boot up one of my Raspbery Pi's. It would have had some Linux partitions and multi partitions etc on it. I'd have to nuke those first.
    For the longest while I just formatted as fat32 as I have Legacy and UEFI devices. That is fine untill the install wim file exceeds 4 gig. Which it does with some of my MSDN ISO's. That means splitting it or going NTFS. I went NTFS as my UEFI laptop is fine with that, others aren't so lucky. The MCT ISO doesn't have the same install wim issue my MSDN iso's have. I haven't used the MCT ISO in a long while though.
      My Computer


  9. Posts : 31,651
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #9

    sportsfan148 said:
    One another point Bree. Just out of curiosity..is it also possible to use Disk Management to prepare the flash drive? You would have to Clean the drive and Convert MBR using Diskpart first. Then switch to Disk Management to create a New Simple Volume and format etc. Then finally go back to Diskpart to make the partition Active.
    Once you have used Diskpart to clean and convert to MBR then yes, you could use Disk Management to create a new simple volume, format it and mark the partition as active (just right-click on it).


    ...Im presuming a Full Format would pick up on any issues on the flash drive whereas a quick format wouldn't flag up any possible errors etc.
    I don't bother. If there were any bad memory locations then I'd expect the attempted copy would also pick up on them.
      My Computers


  10. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
       #10

    It's just to be thorough making sure it gets done.

    Create Bootable USB Flash Drive to Install Windows 10
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:27.
Find Us




Windows 10 Forums