centos格式化优盘命令_Linux下格式化U盘为NTFS格式

思路,删除原有windows的fat分区,新建主分区,格式化为ntfs:CentOS release 5.6 (Final)Kernel 2.6.18-238.12.1.el5 on an x86_64sunrise login: simonsunPassword:Last login: Sun Apr

3 10:31:16 on tty2[simonsun@sunrise ~]$

Vendor: Kingston

Model: DataTraveler 130

Rev: 1.00

Type:

Direct-Access

ANSI SCSI revision: 02SCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughSCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughsd 5:0:0:0: Attached scsi removable disk sdbsd 5:0:0:0: Attached scsi generic sg1 type 0[simonsun@sunrise ~]$ sudo /sbin/fdisk -lDisk /dev/sda: 320.0 GB, 320072933376 bytes255 heads, 63 sectors/track, 38913 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

Device Boot

Start

End

Blocks

Id

System/dev/sda1

*

1

13

104391

83

Linux/dev/sda2

14

38913

312464250

8e

Linux LVMDisk /dev/sdb: 4007 MB, 4007657472 bytes124 heads, 62 sectors/track, 1018 cylindersUnits = cylinders of 7688 * 512 = 3936256 bytes

Device Boot

Start

End

Blocks

Id

System/dev/sdb1

1

1018

3913161

b

W95 FAT32[simonsun@sunrise ~]$ sudo /sbin/fdisk /dev/sdbCommand (m for help): dSelected partition 1Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.SCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughSCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughSyncing disks.[simonsun@sunrise ~]$ sudo /sbin/fdisk /dev/sdbCommand (m for help): nCommand action

e

extended

p

primary partition (1-4)pPartition number (1-4): 1First cylinder (1-1018, default 1):Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-1018, default 1018):Using default value 1018Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.SCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughSCSI device sdb: 7827456 512-byte hdwr sectors (4008 MB)sdb: Write Protect is offsdb: assuming drive cache: write throughSyncing disks.[simonsun@sunrise ~]$ sudo /sbin/mkfs -t ntfs /dev/sdb1Cluster size has been automatically set to 4096 bytes.Initializing device with zeroes: 100% - Done.Creating NTFS volume structures.mkntfs completed successfully. Have a nice day.[simonsun@sunrise ~]$备注:1,最好在终端界面,即Terminal(Ctrl+Alt+F1,F2,F3)界面下执行;2,有时候会遭遇“设备或资源忙“的情况, 一般是因为系统开启了autofs服务,即自动挂载服务,需要临时手动停止一下:

sudo /etc/init.d/autofs stop3,如果是图形化界面(比如centos的gnome下),需要在系统菜单下的首选项里的可移动驱动器和介质,在“可移动存储里”去掉前三行的复选框(热插拔时挂载可移动驱动器、插入时挂载可移动介质、插入时浏览可移动介质),这样就不会出现IO设备或资源忙的错误了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值