linux对中毒u盘分区和格式化


 u盘情况是4G,分2个区,分别为2G。其中一个分区在windows下“我的电脑”里看不见,但在磁盘管理里能看见,但没有盘符,也无法进行格式化,在FC6下,用命令fdisk -l能看见2个分区/dev/sda1 /dev/sda2,但其中一个分区还是不能挂载。

    我把好的分区里的东西备份一下,准备对其重新分区和格式化。步骤如下:

    fdisk /dev/sda //对U盘重新建立分区表

    Command (m for help): m
    Command action
    a toggle a bootable flag
    b edit bsd disklabel
    c toggle the dos compatibility flag
    d delete a partition
    l list known partition types
    m print this menu
    n add a new partition
    o create a new empty DOS partition table
    p print the partition table
    q quit without saving changes
    s create a new empty Sun disklabel
    t change a partition's system id
    u change display/entry units
    v verify the partition table
    w write table to disk and exit
    x extra functionality (experts only)

    Command (m for help):w //保存更改并退出

    fdisk /dev/sda //准备分区拉

    Command (m for help):n //创建一个新的分区
    出现2个选项:e 和p e是扩展分区,p是主分区,我们要选主分区,否则会出错(反正我选e是错了)

    我准备就分一个区的,就直接用默认的。

    Command (m for help):w //保存更改并退出

    这样,分区表创建好了,现在开始格式化吧。

    我想把它格式化成FAT32格式的

    mkfs.vfat -I -O USB /dev/sda1

    格式化完成了。

    顺便说一下,最后我没格式化,它能识别成4G容量,但只可以用2个G

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3