Linux 格式化U盘为ext4格式以及修复分区表方法

编程知识 更新时间:2023-04-29 09:59:11

1.首先执行sudo fdisk -l查看你的u盘的序号,通常是/dev/sdb之类的,U盘分区通常是/dev/sdb1

2.针对将要格式化的分区执行sudo umount  /dev/sdb1 # 必须先卸载该分区

3.sudo mkfs.ext4 /dev/sdb1    # 格式化为ext4分区

4.查看u盘序号时提示错误:

This doesn't look like a partition table
Probably you selected the wrong device.

......

Partition table entries are not in disk order

解决方案:

1.fdisk  /dev/sdb ( 此处改为 u 盘的 Device Boot )
2.出现Command (m for help): p //显示U盘 目前状态

Command (m for help): d
Partition number (1-4): 4 

Command (m for help): d
Partition number (1-4): 3 

Command (m for help): d
Partition number (1-4): 2 

Command (m for help): d

Command (m for help): p

Command (m for help): n

Command action
p primary partition (1-4) :p

Partition number (1-4): 1 

Command (m for help): p 

Command (m for help): x
Expert command (m for help): m
Command action
b move beginning of data in a partition
c change number of cylinders
d print the raw data in the partition table
e list extended partitions
f fix partition order
g create an IRIX (SGI) partition table
h change number of heads
m print this menu
p print the partition table
q quit without saving changes
r return to main menu
s change number of sectors/track
v verify the partition table
w write table to disk and exit

Expert command (m for help): f
Done.

Expert command (m for help): r 

Command (m for help): p 

Command (m for help): w // 保存你所做的工作并且退出。

以上就是对U盘进行重新分区,把 4 part 合为一个。

这时的U盘还没有格式化,执行上述格式化流程.


 

更多推荐

Linux 格式化U盘为ext4格式以及修复分区表方法

本文发布于:2023-04-21 21:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/01bac6bcc54dcb90e8fd0b386584dc8b.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分区表   格式   方法   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 94253文章数
  • 23819阅读数
  • 0评论数