Full Multiple Partitions Support สำหรับ USB Storage Device ใดๆ ปรากฏใน Windows 10 เริ่มต้น Build 1703 (Creators Update) ตอนนี้ Windows 10 User เข้าถึง Partitions ทั้งหมดบน USB Flash Drive (หรือ SD Card) ได้ รวมถึงสร้าง Multiple Logical Partitions บน Media ประเภทนี้ด้วย Built-in OS Tools ได้แล้ว ก่อนหน้านี้ ตอนต่อ USB Stick ที่มีหลาย Partitions (สร้างบน Linux หรือ Third-party Tools) ไปคอมพิวเตอร์ Windows OS แสดงเพียง Primary Partition แรกเท่านั้น (Partitions อื่นถูก Ignore) การทำงานกับ Multiple Partitions ใน Windows ปกติมีได้เฉพาะ Drives ที่ Identified เป็น Fixed (Non-removable/Local)
จำได้ว่า Hard Disk Drives ปกติ (และ USB HDDs) ใน Windows Identified เป็น Basic ส่วน USB Flash Drives และ SD Cards — เป็น Removable OS Detect Disk Type โดย Special RMB (Removable Media Bit) Descriptor บน Device Controller ก่อนหน้านี้เคยพิจารณาวิธีแทนที่ Controller Response ด้วย Special Driver Hitachi Microdrive (Turn a USB Stick Into a Local Hard Disk in Windows)
Windows 10 Creators Update (และใหม่กว่า) แสดง Partitions ทั้งหมดบน USB Stick หรือ SD Card โดยอัตโนมัติ และ Ignore RMB Bit ในกรณีนี้ USB Drive ยัง Identified เป็น Removable Device
วิธีสร้าง Multiple Partitions บน USB Drive ใน Windows 10
ลองสร้างหลาย Partitions บน USB Stick ใน Windows 10 สมมติ Primary Partition มีอยู่แล้วบน USB Stick ครอบครอง Volume ทั้งหมดของ USB Media จะ Shrink มันและสร้าง Second (และต่อไป) Partitions:
- เสียบ USB Stick เข้า USB Port ของคอมพิวเตอร์
- Format USB Flash Drive ใน NTFS File System แล้วเปิด Disk Management (diskmgmt.msc) Console
- คลิกขวา Partition บน USB Stick เลือก Shrink Volume ใน Context Menu
- ระบุ Size ของ Free Space หลัง Shrink คลิก Shrink ตัวอย่าง ต้องการสร้าง 2 Partitions ขนาด 7 GB และ 8 GB บน USB Flash Device 15 GB
- คลิกขวาบน Unallocated Disk Area เลือก New Simple Volume สร้าง Additional Partition
- เลือก Drive Letter, Volume Label และ File System Type (ผม Format Partition ที่ 2 เป็น FAT32)
ได้ USB Stick พร้อม 2 Partitions Partition แรก NTFS Partition ที่สอง FAT32 ทั้งคู่แสดงใน Windows และพร้อมใช้งาน
Partition USB Drive ใน Windows 10 ด้วย DiskPart
สามารถสร้างหลาย Partitions บน USB Flash Drive ด้วย CLI Tool DiskPart ได้ ตัวอย่างนี้สร้าง 2 Partitions: Partition แรก FAT32, Partition ที่สอง NTFS (ไม่สามารถสร้าง Partition แรกเป็น FAT32 จาก GUI ของ Disk Management Console ได้)
เปิด Elevated Command Prompt รัน DiskPart Command ใน Context ของ Diskpart รันคำสั่งต่อไปนี้ทีละคำสั่ง:
list disk
select
clean
create partition primary size=3000
format quick fs=fat32 label="FirstFAT32Partition"
assign letter=J
active
create partition primary
format fs=ntfs quick label="Data(NTFS)"
assign letter=K
list vol
exit
สร้าง Multiple Partitions บน USB Flash Drive ด้วย PowerShell
ยังสามารถสร้างหลาย Partitions บน USB Flash Drive ด้วย PowerShell Cmdlets จาก Built-in Storage Module ได้
หา USB Disk ID บนคอมพิวเตอร์:
Get-Disk
คำสั่งต่อไปนี้จะ ลบ Data ทั้งหมดจาก USB Storage Device
ลบ Partitions ที่มีอยู่บน USB Drive:
Get-Partition –DiskNumber 1 | Remove-Partition
ใช้ PowerShell Commands ต่อไปนี้สร้าง 2 Logical Partitions บน USB Flash Drive และ Format:
New-Partition –DiskNumber 1 -Size 4gb -DriveLetter J
Format-Volume -DriveLetter J -FileSystem NTFS -NewFileSystemLabel USBVol1
New-Partition –DiskNumber 1 –UseMaximumSize -DriveLetter K
Format-Volume -DriveLetter K -FileSystem Fat32 -NewFileSystemLabel USBVol2
จำไว้ USB Sticks พร้อม Multiple Partitions จะแสดงถูกต้องเฉพาะบน Windows 10 1703 และใหม่กว่า ใน Windows เวอร์ชันก่อนหน้า จะยังแสดงเพียง Partition แรกเท่านั้น
หากตอนต่อ USB Flash Drive พร้อมหลาย Partitions Windows ไม่มอบ Drive Letters ให้ ตรวจสอบ Virtual Disk Service Settings ตามบทความ
ทำไมต้องการหลาย Partitions บน USB Flash Drive?
- หาก USB Drive ต้องใช้ใน OS ต่างๆ ด้วย File Systems ต่างๆ (เช่น Windows และ Linux/Android)
- เป็นวิธีง่ายที่สุดซ่อน Data บน USB Media
- หากใช้ USB Flash Drive บูทและติดตั้ง Windows บน UEFI Computers UEFI Computer อนุญาตบูทได้เฉพาะจาก FAT32 Drive แต่ไม่สามารถวางไฟล์ใหญ่กว่า 4 GB ได้ (ข้อจำกัด FAT32 File System) ผลคือต้อง Split Windows install.wim File เป็นหลายส่วน (ดูตัวอย่าง) หรือสร้าง NTFS Partition ที่ 2 บน Bootable USB Device และ Copy Installation WIM/ESD File ไปไว้ที่นั่น