Partition table scan: MBR: not present BSD: not present APM: not present GPT: not present
Creating new GPT entries.
Command (? forhelp): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y
Command (? forhelp): n Partition number (1-128, default 1): First sector (34-60088286, default = 2048) or {+-}size{KMGTP}: Last sector (2048-60088286, default = 60088286) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): 0700 Changed type of partition to 'Microsoft basic data'
Command (? forhelp): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!
Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sda. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully.
重新查看设备路径
sudo fdisk -l
The primary GPT table is corrupt, but the backup appears OK, so that will be used. Disk /dev/sda: 28.7 GiB, 30765219840 bytes, 60088320 sectors Disk model: SanDisk 3.2Gen1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 一串序列号
Device Start End Sectors Size Type /dev/sda1 2048 60088286 60086239 28.7G Microsoft basic data
可以看到多出一个 /dev/sda1 分区。
确认进行格式化
sudo mkfs.exfat /dev/sda1
出现报错:
mkexfatfs 1.3.0 ERROR: failed to open '/dev/sda1'in read-write mode: No such file or directory.
经查,需要先卸载。
sudo umount /dev/sda1
又报错:
umount: /dev/sda1: no mount point specified.
去掉 1 试试
sudo umount /dev/sda
行,没报错,看样子可以进行下一步了。
以防万一再做一步确认。
sudo fdisk -l
The primary GPT table is corrupt, but the backup appears OK, so that will be used. Disk /dev/sda: 28.7 GiB, 30765219840 bytes, 60088320 sectors Disk model: SanDisk 3.2Gen1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 一串序列号
Device Start End Sectors Size Type /dev/sda1 2048 60088286 60086239 28.7G Microsoft basic data
确认建立 exFAT 文件系统。
sudo mkfs.exfat /dev/sda1
还是报错 ERROR: failed to open '/dev/sda1' in read-write mode: No such file or directory.
那就去掉 1
$ sudo mkfs.exfat /dev/sda mkexfatfs 1.3.0 Creating... done. Flushing... done. File system created successfully.
评论