ubuntu下修复U盘并格式化
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盘并格式化相关推荐
- ubuntu下修复U盘只读问题
1.通过mount指令查看u盘挂载的实际设备 /dev/sdb1 on /media/xuxuequan/0BEB-331A type vfat (rw,nosuid,nodev,uid=1000,g ...
- Ubuntu下的U盘启动器制作
Ubuntu下的U盘启动器制作 准备工作 安装 写入 准备工作 原先有两个U盘用来制作U盘启动器,一个Windows系统,一个Ubuntu,奈何windows系统的U盘被我格式化了,只能在Ubuntu ...
- Ubuntu下挂载U盘
2019独角兽企业重金招聘Python工程师标准>>> 第一步:查看U盘信息 首先使用 sudo fdisk -l 命令查看一下U盘在那里, 这个信息查看后,可能会类似看到下面 ...
- 怎样linux下修复u盘,怎样Linux下修复U盘驱动器
导读 U 盘想必在大家的日常生活和工作中都已经不可或缺了,它让我们的文件维护和转移更加方便容易.但随着频繁使用,有可能会出现文件系统错误.坏块.坏扇区而影响正常使用的情况.对于 Windows 用户来 ...
- Ubuntu下百度网盘抽风问题
Ubuntu系统下百度网盘卡在登录界面 今天用百度网盘的时候一直卡在登录动画上,没反应,搜寻各大网站找到了解决方法 打开Terminal在其输入 sudo rm -rf ~/baidunetdisk ...
- Linux下修复U盘坏块,DiskGenius修复U盘坏块问题巧借
U盘是大家日常生活或者是工作中常常会用到的小工具,存储文件等十分方便,但便捷之余也问题多多,比如U盘坏块问题.U盘坏块是难以修复的,最简单的方法就是屏蔽掉损坏了的坏块,这样我们还可以保证U盘的其他部分 ...
- ubuntu下出现u盘read-only情况,如何修复?
今天准备把电脑的文件move到u盘时,发现无法对u盘进行操作,因为不知道为何u盘变成了read-only 那么如何修复这个问题呢? 1.打开终端获得最高权限 2.查找我们的u盘被自动挂载到了哪个目录, ...
- ubuntu下制作u盘启动盘
ubuntu12.04下成功制作了ubuntu13.10 U盘启动盘. 成功 ubuntu14.04下成功制作了centos.7 U盘启动盘.成功 1.安装u盘制作工具unetbootin sudo ...
- ubuntu下制作u盘镜像_deepin下制作win10启动U盘
1.准备 ①下载multibootusb:http://multibootusb.org/page_download/ ②准备一个win10的镜像文件 ③准备一个U盘,最好先备份U盘数据再格式化一道 ...
最新文章
- How does Spring @Transactional Really Work?--转
- 局域网传输文件的一点研究
- 群晖 上传 源文件不存在_群晖NAS连接百度网盘报错?原因是这样的
- 上下伸缩代码_CQRS之旅——旅程4(扩展和增强订单和注册限界上下文)
- LAMP+LNMP视频教程
- D3D学习摘记(I)上
- java编程思想练习题_java编程思想练习题答案.doc
- Matlab 轴承信号仿真+分析
- Msfconsole爆破ssh
- 如何为java添加日历控件_laydate日历控件使用方法详解
- 截止失真放大电路_音频放大器结构组成_音频放大器分类
- [原创] 我了解北京地区消费贷利息情况
- iOS数据持久化设计
- DELL笔记本自带键盘启动与关闭方式
- Linux (Ubuntu)c编程 (入门必看)
- 洪蜀宁-区块链原始大佬的文章-金丘区块链院长
- lager_error_logger_h dropped ~p messages in the last second that exceeded the limit of ~p messages/s
- 语音变速、变调方法汇总
- java jar 打印_三种Java打印PDF文档的实例代码
- 面向集团客户的云计算运营平台概述——之云计算运营平台方案(一)