sfdisk 无法将分区写入磁盘

sfdisk 无法将分区写入磁盘

我正在尝试让我的 microSD 卡可启动至 Ubuntu。我正在尝试使用它sfdisk来创建分区。当我这样做时,这是我收到的错误:

Using sfdisk to create partition layout
-----------------------------
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 30436 cylinders, 64 heads, 32 sectors/track
Old situation:
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 30436/64/32).
For this listing I'll assume that geometry.
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sdb1         4  30436- 30433-  31162880    c  W95 FAT32 (LBA)
/dev/sdb2         0      -      0          0    0  Empty
/dev/sdb3         0      -      0          0    0  Empty
/dev/sdb4         0      -      0          0    0  Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sdb1   *     1     96     96      98304    e  W95 FAT16 (LBA)
/dev/sdb2         0      -      0          0    0  Empty
/dev/sdb3         0      -      0          0    0  Empty
/dev/sdb4         0      -      0          0    0  Empty
/dev/sdb: Input/output error

sfdisk: Failed writing the partition on /dev/sdb
Re-reading the partition table ...
/dev/sdb: Input/output error
Error closing /dev/sdb
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

有什么想法会出现什么问题吗?磁盘可写。

答案1

运行此命令时您是 root 吗?确保在执行这些类型的命令时使用 提升权限sudo,执行这些类型的任务通常需要使用该权限。

例子

$ sudo sfdisk

相关内容