Diskpart command info needed?

Page 1 of 3 123 LastLast

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

    Diskpart command info needed?


    Hi,
    I have a UEFI boot laptop (not Legacy BIOS).
    If I was to use Diskpart to create a Windows 10 bootable USB flash drive for UEFI only would the following commands be correct? If my understanding is correct there is no need for the "Active" command to be typed in as it isn't required for UEFI bootable PC's/laptops or have I got that wrong?
    diskpart
    list disk
    select disk # <- replace # with the actual disk number of the USB flash drive
    clean <- this will erase the disk selected above, make sure it is the USB flash drive!
    create partition primary
    select partition 1
    format fs=fat32
    exit

    Also, just as a matter of interest. Would it also be possible to do this procedure using Disk Management? Obviously you would have to perform the "Clean" command using Diskpart first as that command isn't available in Disk Management as far as I know
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #2

    Hi there

    I might be wrong but I think to boot UEFI only the usb drive has to have a /boot/efi or a /efi partition defined.

    The easiest way IMO if you have a windows ISO is to use RUFUS to create the bootable USB drive -- there's options for MBR, MBR/UEFI for BIOS computers and UEFI only.

    Cheers
    jimbo
      My Computer


  3. Posts : 15,485
    Windows10
       #3

    It is fine but I would add assign to make sure it gets a drive letter automatically, and use quick format.

    Code:
    diskpart
    list disk
    select disk # <- replace # with the actual disk number of the USB flash drive
    clean <- this will erase the disk selected above, make sure it is the USB flash drive!
    create partition primary
    select partition 1
    format fs=fat32 quick
    assign
    exit
    You can do everything beyond clean from disk management but hardly worth the effort.
      My Computer


  4. Posts : 15,485
    Windows10
       #4

    jimbo45 said:
    Hi there

    I might be wrong but I think to boot UEFI only the usb drive has to have a /boot/efi or a /efi partition defined.

    The easiest way IMO if you have a windows ISO is to use RUFUS to create the bootable USB drive -- there's options for MBR, MBR/UEFI for BIOS computers and UEFI only.

    Cheers
    jimbo
    Not the case. The requirement is that the boot partition has to be fat32. It does not matter if all other system files are in same partition.
      My Computer


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

    jimbo45 said:
    I might be wrong but I think to boot UEFI only the usb drive has to have a /boot/efi or a /efi partition defined.
    The easiest way IMO if you have a windows ISO is to use RUFUS to create the bootable USB drive -- there's options for MBR, MBR/UEFI for BIOS computers and UEFI only...
    No, the only requirement for the usb to be bootable for UEFI is that it has an MBR partition layout, formatted to Fat32 and that this contains the file Bootmgr.efi and the folder efi and its contents - that's all, and easily achieved with native Windows commands.
      My Computers


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

    jimbo45 said:
    Hi there

    I might be wrong but I think to boot UEFI only the usb drive has to have a /boot/efi or a /efi partition defined.

    The easiest way IMO if you have a windows ISO is to use RUFUS to create the bootable USB drive -- there's options for MBR, MBR/UEFI for BIOS computers and UEFI only.

    Cheers
    jimbo
    Hi Jimbo. I prefer to use Diskpart if possible. Ive read that the Active command isn't necessary for UEFI only boot as no Active partition is required on the flash drive and that boot sectors aren't used for UEFI at all. Wouldn't the Efi boot files be included in the Windows 10 ISO downloaded from the Microsoft site. From what Ive read you then mount it and copy and paste all the files from the ISO over onto the USB flash drive. I'd just like to verify that that's correct
      My Computer


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

    sportsfan148 said:
    I have a UEFI boot laptop (not Legacy BIOS).
    If I was to use Diskpart to create a Windows 10 bootable USB flash drive for UEFI only would the following commands be correct?
    Basically yes, you have it right. But if this usb has ever been formatted by Rufus or the like it may now have a gpt partition layout. After CLEAN you can use CONVERT MBR as a precaution to make sure it's got the correct partition type.

    ...just as a matter of interest. Would it also be possible to do this procedure using Disk Management?
    After the CLEAN and a precautionary CONVERT MBR, yes Disk Management can also do the rest of the preparation. It would be worth setting the partition as Active, as this will allow it to boot on a legacy system too.
      My Computers


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

    cereberus said:
    It is fine but I would add assign to make sure it gets a drive letter automatically, and use quick format.

    Code:
    diskpart
    list disk
    select disk # <- replace # with the actual disk number of the USB flash drive
    clean <- this will erase the disk selected above, make sure it is the USB flash drive!
    create partition primary
    select partition 1
    format fs=fat32 quick
    assign
    exit
    You can do everything beyond clean from disk management but hardly worth the effort.
    Hi Cereberus. Is there a reason why you say Full Format shouldn't be used? The reason I like to use Full Format is it checks the flash drive as well
      My Computer


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

    Bree said:
    No, the only requirement for the usb to be bootable for UEFI is that it has an MBR partition layout, formatted to Fat32 and that this contains the file Bootmgr.efi and the folder efi and its contents - that's all, and easily achieved with native Windows commands.
    Hi Bree, So How do you get the Bootmgr.efi and the folder efi and its contents onto the flash drive?...Is that done automatically after mounting the downloaded Windows 10 ISO when you copy and paste the Windows ISO files over onto the flash drive? You've also referenced native Windows commands. Is there something wrong with my Diskpart commands then..and is it OK to leave out the Active command as I mentioned?
      My Computer


  10. Posts : 15,485
    Windows10
       #10

    sportsfan148 said:
    Hi Cereberus. Is there a reason why you say Full Format shouldn't be used? The reason I like to use Full Format is it checks the flash drive as well
    You can but I have never found it necessary and takes more time.
      My Computer


 

  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 12:42.
Find Us




Windows 10 Forums