Linux 格式化U盘为ext4格式以及修复分区表方法
2015-11-25 18:43
771 查看
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盘还没有格式化,执行上述格式化流程.
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 C 正则表达式运用(regex.h)
- linux中用户相关的命令
- linux下MySQL操作历史记录 ~/.mysql_history
- 操作系统——linux系统文件目录机构
- 克隆或复制VMware虚拟机后,Linux系统eth0消失,显示eth1
- linux__查看库中的函数
- linux java环境搭建--安装jdk
- linux下mysql中文乱码(中文问号)解决办法
- libpcap在centos安装
- Linux crontab 命令格式与详细例子
- Kali2.0 linux安装漏洞扫描工具Nessus6
- Linux 主机名修改
- linux tee 命令
- CentOS修改Hotname
- CentOS 6.5下Git服务器搭建
- 在CentOS上搭建PHP服务器环境
- linux安装桌面环境(GNOME)VNC连接Linux
- Linux安装VritualBox实现虚拟机win2003端口映射 支持远程
- VBox的Linux虚拟机,共享文件夹
- CentOS7新装系统后需调整的设定