格式化硬盘命令cmd_格式化硬盘命令linux
1.linux对u盘格式化linux对U盘格式化
2.Linux如何格式化磁盘?
3.在LINUX系统中,分区与格式化硬盘的命令是什么?
4.悬赏,linux系统与全盘格式化问题!!高手请进。。。
5.Linux中格式化失败,没有找到命令
在Linux上使用mkfs命令来格式化U盘。
该命令详细参数 :
device : 预备检查的硬盘分区,例如:/dev/sda1
-V : 详细显示模式
-t : 给定档案系统的型式,Linux 的预设值为 ext2
-c : 在制做档案系统前,检查该partition 是否有坏轨
-l bad_blocks_file : 将有坏轨的block资料加到 bad_blocks_file 里面
block : 给定 block 的大小
实例:
在 /dev/hda5 上建一个 msdos 的档案系统,同时检查是否有坏轨存在,并且将过程详细列出来 :
mkfs -V -t msdos -c /dev/hda5
将sda6分区格式化为ext3格式
mfks -t ext3 /dev/sda6
注意:这里的文件系统是要指定的,比如 ext3 ;reiserfs ;ext2 ;fat32 ;msdos 等。
linux对u盘格式化linux对U盘格式化
该系统硬盘分区工具有:fdisk、parted、gparted、diskpart。
1、fdisk:这是传统的Linux硬盘分区工具,使用命令行界面进行操作。它提供了创建、删除、格式化分区等基本功能。
2、parted:parted是一个功能强大的磁盘分区管理工具,支持多种文件系统格式,可以进行分区大小调整、复制分区等操作。
3、gparted:gparted是一个图形界面的分区编辑器,可以在图形界面下方便地管理硬盘分区,支持多种文件系统格式。
4、diskpart:diskpart是Windows系统下的硬盘分区工具,也可以在Linux下使用,通过命令行界面进行操作。它提供了类似于Windows磁盘管理器的功能。
Linux如何格式化磁盘?
linux如何格式化u盘为fat32?
一、执行fdisk-l查看linux设备,我的U盘是sdb4二、执行mkfs-tvfat/dev/sdb4这样就可以格式化完成了然后在挂载就可以使用了,非常简单。
mkfs-t后面指定格式可以是ext3格式或者其它格式。
linux系统格式化磁盘命令?
一、针对将要格式化的分区,以ext3为例:
$sudoumount/dev/sda1#必须先卸载该分区,这里要格式化的是/dev/sda1分区。
$sudomkfs.ext3-m0.05/dev/sda1#注意-m后的参数,设定的已经是百分位,这里设定为0.05,是0.05%,也就是万分之5!
这样以1T的分区为例,1T=GB=1048576MB(都是乘以的关系),1048576MB*0.0005=524.288MB。
也就是说设定-m参数之后,保留区大概是524MB。当然你可以根据自己喜好设定。
二、对已经格式化完毕的分区,并且不想擦出分区中的数据,可以使用tune2fs-m的方法:
这条命令无须先卸载分区。
$sudotune2fs-m0.05/dev/sda2#这个例子是转换/dev/sda2分区的superuser保留区,同样设定为0.05,在提醒一次,是0.05%,也就是万分之5。
w10怎么格式化linux系统u盘?
格式化的时候选择格式为exFat
u盘格式化文件系统用什么格式?
U盘支持的存储格式一般有FAT32、NTFS和exFAT,不同格式之间的特性和兼容性会有区别。下面是对三种格式的具体说明:
1、FAT32格式:FAT32格式兼容性相对好一些,几乎可以应对所有主流的操作系统(比如Windows、MacOS、Linux等),并且可以快速读写。但它的缺点是不能设置权限,安全等级较低;而且这个格式下的U盘最高只能支持4G以下的单个文件传输。
2、NTFS格式:NTFS格式使用最为广泛,可以对此格式的U盘进行权限设置,并且在互换性和实用性上远高于FAT3。NTFS格式在支持文件上最大可以拓展为256TB。需要使用到PE盘的用户,NTFS格式刷系统分区时也相对适用。
3、exFAT格式:exFAT格式是FAT32的升级版,解决了FAT32单个文件不能高于4GB大小的弊端,最大支持256GB拓展。exFAT格式跨平台能力十分出众,也是微软为了闪存设备特地设计的文件系统,是作为U盘等移动设备是最好的选择之一。
我在用U盘linux装系统时,怎么将硬盘格式化?
用fdisk分区,然后mkfs.ext3或者mkfs.ext4等格式化就行了。安装程序也可以分区并格式化的,不必自己专门使用上述命令
在LINUX系统中,分区与格式化硬盘的命令是什么?
先给硬盘分区,再格式化\x0d\1、分区命令fdisk,cfdisk,parted等\x0d\a)查看有几块硬盘\x0d\fdisk -l\x0d\b)比如移动硬盘是/dev/sdb\x0d\fdisk /dev/sdb\x0d\不会了就输入?看着帮助\x0d\\x0d\2、为了使用ntfs分区,安装ntfs-3g\x0d\下载ntfs-3g_ntfsprogs-2013.1.13.tgz\x0d\tar zxf ntfs-3g_ntfsprogs-2013.1.13.tgz\x0d\cd ntfs-3g_ntfsprogs-2013.1.13/\x0d\./configure\x0d\make\x0d\make install\x0d\\x0d\3、分好区后,比如/dev/sdb1\x0d\格式化成ntfs:\x0d\mkfs.ntfs /dev/sdb1\x0d\mount -t ntfs-3g /dev/sdb1 /mnt
悬赏,linux系统与全盘格式化问题!!高手请进。。。
Linux下常用的分区工具:
fdisk/sfdisk:命令行工具,各种版本和环境都能使用,包含在软件包util-linux中
diskdruid:图形化分区工具,只能在安装REDHAT系统时使用。
第一步:fdisk
[root@novice ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
[root@novice ~]# fdisk /dev/sdb
Command (m for help): #在输入上面的命令后会出现左边的提示,输入m就会得到一个帮助菜单,如下:
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 sing 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)
#help虽然是英文的,可都很简单,在这里不再解释。
#现在,我们正式开始分区的操作:
Command (m for help): n #新建分区
Command action
e extended
p primary partition (1-4)
#e/p分别对应扩展分区 /主分区;我们先分四个主分区,每个50M;然后再来增加主分区或扩展分区,看会出现怎样的状况,嘿嘿。
p #分区类型为主分区
Partition number (1-4, default 1): 1 #分区号,在这里我们依次选择1、2、3、4
First sector (2048-496127, default 2048): #指定分区的起始扇区,一般默认,按enter键即可。
Last sector, +sectors or +size{K,M,G} (2048-496127, default 496127): +50M #指定分区的终止扇区,根据前面的提示我们可以做出相应的选择+sectors 或 +size{K,M,G}
Command (m for help): p #用p打印出已建好的分区列表
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
#剩下的三个分区的建立操作同上
#分好四个主分区后的情况如下
Command (m for help): p
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
/dev/sdb2 104448 206847 51200 83 Linux
/dev/sdb3 206848 309247 51200 83 Linux
/dev/sdb4 309248 309298 25+ 83 Linux
#已经建好四个主分区啦,现在我们来看看如果再建主分区或是扩展分区的话会出现怎样的情况:
Command (m for help): n
You must delete some partition and add an extended partition first
#看到了吧,不能再建分区啦!要再建分区的话必须删除some分区,再新建一个扩展分区才行。
#现在,我们删掉一个主分区,来新建扩展分区
Command (m for help): d #删除分区
Partition number (1-4): 4 #选择要删除分区的分区号,我们选第四个
Command (m for help): p #打印,如下,四个分区变成了三个!
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
/dev/sdb2 104448 206847 51200 83 Linux
/dev/sdb3 206848 309247 51200 83 Linux
#新建一个扩展分区
#如果在没有建满三个主分的区的情况下建立扩展分区,相关选项会有些不同。
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Selected partition 4
First sector (309248-496127, default 309248): #enter,默认
Using default value 309248
Last sector, +sectors or +size{K,M,G} (309248-496127, default 496127): #enter,默认,使用剩余空间
Using default value 496127
Command (m for help): p
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
/dev/sdb2 104448 206847 51200 83 Linux
/dev/sdb3 206848 309247 51200 83 Linux
/dev/sdb4 309248 496127 93440 5 Extended
#接下来,我们在新建的扩展分区里再新建两个逻辑分区,因为已经有了三个主分区,这里不会再显示是建立逻辑分区还是主分区的提示!
Command (m for help): n
First sector (311296-496127, default 311296): #enter
Using default value 311296
Last sector, +sectors or +size{K,M,G} (311296-496127, default 496127): +50M
Command (m for help): n
First sector (415744-496127, default 415744): #enter
Using default value 415744
Last sector, +sectors or +size{K,M,G} (415744-496127, default 496127): #enter
Using default value 496127
Command (m for help): p
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
/dev/sdb2 104448 206847 51200 83 Linux
/dev/sdb3 206848 309247 51200 83 Linux
/dev/sdb4 309248 496127 93440 5 Extended
/dev/sdb5 311296 413695 51200 83 Linux
/dev/sdb6 415744 496127 40192 83 Linux
#上面的列表,就是我们今天分区的成果啦!接下来保存退出,重启计算机,就可以进行下一步的mkfs操作啦!如果忘记了相关的操作命令,记得按m!!!
Command (m for help): w #保存
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
另:在建好分区后,我们还可以更改相关分区的文件系统类型
#如,我们要把第二个主分区改成Linux下的交换分区,操作如下
Command (m for help): t #更改文件系统类型
Partition number (1-6): 2 #选择第二个分区
Hex code (type L to list codes): L #选择要更改的文件系统编码,可以按L来查看相关编码信息。
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
............
16 Hidden FAT16 64 Novell Netware af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 65 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 70 DiskSecure Mult b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 75 PC/IX bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 80 Old Minix be Solaris boot ff BBT
1e Hidden W95 FAT1
Hex code (type L to list codes): 82 #查找到linux swap的编码为82
Changed system type of partition 2 to 82 (Linux swap / Solaris)
Command (m for help): p
..............
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
/dev/sdb2 104448 206847 51200 82 Linux swap / Solaris
/dev/sdb3 206848 309247 51200 83 Linux
/dev/sdb4 309248 496127 93440 5 Extended
/dev/sdb5 311296 413695 51200 83 Linux
/dev/sdb6 415744 496127 40192 83 Linux
#最后别忘了保存!如果你须要的话!
#扩展分区不能直接使用,逻辑分区只能建立在扩展分区上!
第二步:mkfs(mkfs时分区的格式最好与fdisk设定的分区格式一致,不然.......)
mkfs支持ext2 ext3 vfa msdos jfs reiserfs等文件系统。
用法1:mkfs -t
例: mkfs -t ext3 /dev/sdb2
用法2:mkfs.
例:mkfs,vfat /dev/sdb3
mke2fs支持ext2/ext3文件系统
用法:mke2fs [-j]
例:mke2fs -j /dev/sdb5
# 更多更具体的用法请参照相关命令的man手册
下面,接着实验:
例一
[root@novice ~]# mkfs -t ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size= (log=0)
Fragment size= (log=0)
Stride=0 blocks, Stripe width=0 blocks
12824 inodes, 51200 blocks
2560 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=52428800
7 block groups
8192 blocks per group, 8192 fragments per group
1832 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
第三部:挂载
挂载:mount
例:mount /dev/sdb1 /mnt /sdb1
卸载:umonut
例:umount /dev/sdb1
Linux中格式化失败,没有找到命令
对于Linux系统的全盘格式化,可以按照下面的步骤进行操作:1. 首先需要进入Linux系统的终端模式,可以使用Ctrl+Alt+T组合键打开终端。2. 在终端中输入\"sudo su\"命令,切换到root用户。3. 输入\"fdisk -l\"命令,查看当前系统的硬盘分区情况,确定需要格式化的硬盘。4. 输入\"umount /dev/sdx\"命令(其中x为需要格式化的硬盘所在的编号),卸载该硬盘的挂载点。5. 输入\"fdisk /dev/sdx\"命令,进入硬盘分区编辑器,删除该硬盘上所有的分区。6. 输入\"w\"命令,保存分区表。7. 输入\"mkfs.ext4 /dev/sdx\"命令(也可以使用其他格式,如mkfs.ntfs等),格式化该硬盘为ext4文件系统。8. 格式化完成后,输入\"mount /dev/sdx /mnt\"命令,将该硬盘挂载到指定的挂载点。9. 最后,使用\"df -h\"命令确认该硬盘已经成功挂载到指定的挂载点。总之需要注意在操作过程中,要仔细确认需要格式化的硬盘,以免误操作导致数据丢失。建议在格式化硬盘前进行备份,避免重要数据丢失。
如果没有正确分区,那么磁盘格式化就会失败。
linux格式化命令,Linux下有一条mkfs命令,相当于format,可以对磁盘进行文件系统制作操作(或者说格式化)。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。