如何通过命令将磁盘分区和格式化为“LBA”精度?

如何通过命令将磁盘分区和格式化为“LBA”精度?

如何分区/dev/sdb/dev/sdb1/dev/sdb2,然后格式化/dev/sdb1为 exFAT (或 FAT32 )左心室射血分数=1 到 2097152 通过命令? (LBA=0 为 MBR 保留)

答案1

我创建了一个循环设备进行测试:

dd if=/dev/zero of=tmp.img bs=1M count=100
modprobe loop
dd if=/dev/zero of=tmp.img bs=1M count=100
losetup /dev/loop0 tmp.img

进而:

 # parted --script /dev/loop0 unit s mklabel msdos \
   mkpart primary fat32 1 2048 mkpart primary fat32 2049 4096 print
 Warning: The resulting partition is not properly aligned for best performance.
 Warning: The resulting partition is not properly aligned for best performance.
 Model: Loopback device (loopback)
 Disk /dev/loop0: 204800s
 Sector size (logical/physical): 512B/512B
 Partition Table: msdos

 Number  Start  End    Size   Type     File system  Flags
  1      1s     2048s  2048s  primary               lba, type=0c
  2      2049s  4096s  2048s  primary               lba, type=0c

格式化

mkfs.vfat -F 32 /dev/sdb1

相关内容