第一步,取得一个centos6.x的iso镜像,假设我当前的ios镜像在/iso/CentOS-6.6-x86_64-bin-DVD1.iso


第二步,插入u盘并查看u盘在当前系统下的代号
# fdisk -l


Disk identifier: 0x273e7463

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        4418     4524032   17  Hidden HPFS/NTFS

Disk /dev/sdb1: 4467 MB, 4467982336 bytes
64 heads, 32 sectors/track, 4261 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x273e7463

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           1        4418     4524032   17  Hidden HPFS/NTFS

第三步,卸载u盘,


# umount /dev/sdb1


第四步,使用dd命令

# dd if=/iso/CentOS-6.6-x86_64-bin-DVD1.iso of=/dev/sdb


 (记住这里of是输出设备,应该是/dev/sdb而不是/dev/sdb1)


第五步,制作成功之后出现如下画面

 

注:dd命令运行后不显示复制状态,要查看复制状态可以再打开一个终端,输入“while killall -USR1 dd; do sleep 5; done”查看复制状态。

while killall -USR1 dd; do sleep 5;done


5216736+0 records out
2670968832 bytes (2.7 GB) copied, 391.29 s, 6.8 MB/s
5317833+0 records in
5317833+0 records out
2722730496 bytes (2.7 GB) copied, 396.297 s, 6.9 MB/s
5418209+0 records in
5418208+0 records out
2774122496 bytes (2.8 GB) copied, 401.319 s, 6.9 MB/s
5519217+0 records in
5519217+0 records out
2825839104 bytes (2.8 GB) copied, 406.326 s, 7.0 MB/s
5618913+0 records in
5618912+0 records out
2876882944 bytes (2.9 GB) copied, 411.356 s, 7.0 MB/s
5619585+0 records in
5619585+0 records out
2877227520 bytes (2.9 GB) copied, 416.413 s, 6.9 MB/s
5619961+0 records in
5619961+0 records out
2877420032 bytes (2.9 GB) copied, 421.431 s, 6.8 MB/s
5673785+0 records in
5673785+0 records out
2904977920 bytes (2.9 GB) copied, 426.377 s, 6.8 MB/s




Linux运维的自我修养-ywliyq

  • 技术交流,请加QQ群:256172681

  • 给我写信:ywliyq@163.com

  • 我的技术博客:http://ywliyq.blog.51cto.com/