ref:http://ju.outofmemory.cn/entry/202389

前一段时间U盘分区表被搞坏了,在Win7下没有太好的命令来修复,量产工具也是各种不给力,最后还是在ubuntu下搞定的。这里笔记下使用的工具吧:

查看和修改分区fdisk:

可以使用fdiks查看和修改分区,这里作者就是通过o命令来重置的分区表。

cstriker1407@cstriker1407-x64:~$ sudo fdisk -l #查看当前分区Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: dos
Disk identifier: 0x5fb120daDevice     Boot    Start        End    Sectors   Size Id Type
/dev/sda1           2048   19531775   19529728   9.3G 82 Linux swap / Solaris
/dev/sda2  *    19531776 1953523711 1933991936 922.2G 83 LinuxDisk /dev/sdb: 7.5 GiB, 8011087872 bytes, 15646656 sectors
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: dos
Disk identifier: 0x4a022e4fDevice     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 15646655 15644608  7.5G 83 Linuxcstriker1407@cstriker1407-x64:~$ sudo fdisk /dev/sdb1 #选中U盘分区Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.命令(输入 m 获取帮助): m #使用m命令查看Help:DOS (MBR)a   toggle a bootable flagb   edit nested BSD disklabelc   toggle the dos compatibility flagGenericd   delete a partition  #删除分区l   list known partition types #查看支持的分区类型n   add a new partition  #新建一个分区p   print the partition table #打印当前分区表t   change a partition type  #更改分区类型v   verify the partition table #校验分区表Miscm   print this menuu   change display/entry unitsx   extra functionality (experts only)Save & Exitw   write table to disk and exit #保存分区并退出q   quit without saving changesCreate a new labelg   create a new empty GPT partition tableG   create a new empty SGI (IRIX) partition tableo   create a new empty DOS partition tables   create a new empty Sun partition table

格式为NTFS:

cstriker1407@cstriker1407-x64:~$ sudo mkfs.ntfs -f /dev/sdb1 -L MyUSB  #使用mkfs.ntfs对U盘进行格式化
cstriker1407@cstriker1407-x64:~$ sudo mkfs -t ntfs /dev/sdb1  #使用mkfs对U盘进行格式化cstriker1407@cstriker1407-x64:~$ mkfs  #mkfs使用帮助
用法:mkfs [options] [-t <type>] [fs-options] <device> [<size>]选项:-t, --type=<type>  filesystem type; when unspecified, ext2 is usedfs-options     parameters for the real filesystem builder<device>       path to the device to be used<size>         number of blocks to be used on the device-V, --verbose      explain what is being done;specifying -V more than once will cause a dry-run-V, --version      display version information and exit;-V as --version must be the only option-h, --help         display this help text and exitFor more information see mkfs(8).cstriker1407@cstriker1407-x64:~$ mkfs.ntfs #mkfs.ntfs使用帮助Usage: mkntfs [options] device [number-of-sectors]Basic options:-f, --fast                      Perform a quick format-Q, --quick                     Perform a quick format-L, --label STRING              Set the volume label-C, --enable-compression        Enable compression on the volume-I, --no-indexing               Disable indexing on the volume-n, --no-action                 Do not write to diskAdvanced options:-c, --cluster-size BYTES        Specify the cluster size for the volume-s, --sector-size BYTES         Specify the sector size for the device-p, --partition-start SECTOR    Specify the partition start sector-H, --heads NUM                 Specify the number of heads-S, --sectors-per-track NUM     Specify the number of sectors per track-z, --mft-zone-multiplier NUM   Set the MFT zone multiplier-T, --zero-time                 Fake the time to be 00:00 UTC, Jan 1, 1970-F, --force                     Force execution despite errorsOutput options:-q, --quiet                     Quiet execution-v, --verbose                   Verbose execution--debug                     Very verbose executionHelp options:-V, --version                   Display version-l, --license                   Display licensing information-h, --help                      Display this helpDevelopers' email address: ntfs-3g-devel@lists.sf.net
News, support and information:  http://tuxera.com

ubuntu下修复U盘并格式化相关推荐

  1. ubuntu下修复U盘只读问题

    1.通过mount指令查看u盘挂载的实际设备 /dev/sdb1 on /media/xuxuequan/0BEB-331A type vfat (rw,nosuid,nodev,uid=1000,g ...

  2. Ubuntu下的U盘启动器制作

    Ubuntu下的U盘启动器制作 准备工作 安装 写入 准备工作 原先有两个U盘用来制作U盘启动器,一个Windows系统,一个Ubuntu,奈何windows系统的U盘被我格式化了,只能在Ubuntu ...

  3. Ubuntu下挂载U盘

    2019独角兽企业重金招聘Python工程师标准>>> 第一步:查看U盘信息  首先使用  sudo fdisk -l 命令查看一下U盘在那里,  这个信息查看后,可能会类似看到下面 ...

  4. 怎样linux下修复u盘,怎样Linux下修复U盘驱动器

    导读 U 盘想必在大家的日常生活和工作中都已经不可或缺了,它让我们的文件维护和转移更加方便容易.但随着频繁使用,有可能会出现文件系统错误.坏块.坏扇区而影响正常使用的情况.对于 Windows 用户来 ...

  5. Ubuntu下百度网盘抽风问题

    Ubuntu系统下百度网盘卡在登录界面 今天用百度网盘的时候一直卡在登录动画上,没反应,搜寻各大网站找到了解决方法 打开Terminal在其输入 sudo rm -rf ~/baidunetdisk ...

  6. Linux下修复U盘坏块,DiskGenius修复U盘坏块问题巧借

    U盘是大家日常生活或者是工作中常常会用到的小工具,存储文件等十分方便,但便捷之余也问题多多,比如U盘坏块问题.U盘坏块是难以修复的,最简单的方法就是屏蔽掉损坏了的坏块,这样我们还可以保证U盘的其他部分 ...

  7. ubuntu下出现u盘read-only情况,如何修复?

    今天准备把电脑的文件move到u盘时,发现无法对u盘进行操作,因为不知道为何u盘变成了read-only 那么如何修复这个问题呢? 1.打开终端获得最高权限 2.查找我们的u盘被自动挂载到了哪个目录, ...

  8. ubuntu下制作u盘启动盘

    ubuntu12.04下成功制作了ubuntu13.10 U盘启动盘. 成功 ubuntu14.04下成功制作了centos.7 U盘启动盘.成功 1.安装u盘制作工具unetbootin sudo ...

  9. ubuntu下制作u盘镜像_deepin下制作win10启动U盘

    1.准备 ①下载multibootusb:http://multibootusb.org/page_download/ ②准备一个win10的镜像文件 ③准备一个U盘,最好先备份U盘数据再格式化一道 ...

最新文章

  1. How does Spring @Transactional Really Work?--转
  2. 局域网传输文件的一点研究
  3. 群晖 上传 源文件不存在_群晖NAS连接百度网盘报错?原因是这样的
  4. 上下伸缩代码_CQRS之旅——旅程4(扩展和增强订单和注册限界上下文)
  5. LAMP+LNMP视频教程
  6. D3D学习摘记(I)上
  7. java编程思想练习题_java编程思想练习题答案.doc
  8. Matlab 轴承信号仿真+分析
  9. Msfconsole爆破ssh
  10. 如何为java添加日历控件_laydate日历控件使用方法详解
  11. 截止失真放大电路_音频放大器结构组成_音频放大器分类
  12. [原创] 我了解北京地区消费贷利息情况
  13. iOS数据持久化设计
  14. DELL笔记本自带键盘启动与关闭方式
  15. Linux (Ubuntu)c编程 (入门必看)
  16. 洪蜀宁-区块链原始大佬的文章-金丘区块链院长
  17. lager_error_logger_h dropped ~p messages in the last second that exceeded the limit of ~p messages/s
  18. 语音变速、变调方法汇总
  19. java jar 打印_三种Java打印PDF文档的实例代码
  20. 面向集团客户的云计算运营平台概述——之云计算运营平台方案(一)

热门文章

  1. 版权费用外流,中国音乐产业被境外唱片公司收割?
  2. 果园机器人反思稿_果园机器人读后感
  3. 容器性能测验 调研报告
  4. 计算机等级应用考试种类是什么,优·计算机等级考试分类练习题.doc
  5. ESafeKiller 亿赛通
  6. J-link v8重刷固件(win7,win8.1,win10)
  7. 兰州大学最新预测:新冠大流行将于2023年底结束
  8. 一文回顾AI绘画的成长之路:从简笔画到真实人脸生成
  9. VS2005中文版下载地址和msdn_vs2005中文版
  10. 2021-10-16 每天几个LCEDA小知识——修改原理图纸尺寸