To create a centos5.9-x86_64 USB flash drive,
Mount a 16g USB flash drive to the Virtual Machine of VMware Workstation:
Check the current disk status
Fdisk-l
Partition
Fdisk/dev/SDB
D # Delete existing partition-repeat as necessary
N # New Partition
P # primary
1 # Partition Number
<Enter> # Take the default
+ 100 m # Add 100 MB
T # change the type
1 # Partition Number
B # vfat
N # New Partition
P # primary
2 # Partition Number
<Enter> # Take the default
+ 5 GB
N # New Partition
E # primary
3 # Partition Number
<Enter> # Take the default
<Enter> # Take the default
N # New Partition
L # logical partitioning
<Enter> # Take the default
+ 3G
T # change the type
5 # Partition Number
B # vfat
N # New Partition
L # logical partitioning
<Enter> # Take the default
+ 3G
T # change the type
6 # Partition Number
B # vfat
N # New Partition
L # logical partitioning
<Enter> # Take the default
<Enter> # Take the default
T # change the type
7 # Partition Number
B # vfat
P
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/34/39/wKiom1Oqqi-QAMXGAAMiVq_Iq3o258.jpg "Title =" .png "alt =" wKiom1Oqqi-QAMXGAAMiVq_Iq3o258.jpg "/>
W
Format
Mkfs. vfat-N boot/dev/sdb1
Mkfs. ext2-M 0-B 4096-l data/dev/sdb2
Mkfs. vfat-N do/dev/sdb5
Mkfs. vfat-N do/dev/sdb6
Mkfs. vfat-N wolf/dev/sdb7
Re-plug the USB flash disk, mount the Data Partition, mount the first ISO, copy some data to the Data Partition, then copy the ISO to the Data Partition, and then umount Partition
Mkdir-P/Media/boot
Mount/dev/sdb1/Media/boot
Mkdir-P/Media/Data
Mount/dev/sdb2/Media/Data
Mount-o loop/path/to/CentOS-6.0-x86_64-bin-DVD1.iso/Media/ISO/
CP-RV/Media/ISO/images/Media/Data
CP-RV/path/to/CentOS-6.0-x86_64-bin-DVD *. ISO/Media/Data
Umount/Media/Data
Install syslinux and use syslinux to create a Linux boot disk in the/dev/sdb1 partition of the U disk, covering the mbr of the u disk.
Yum-y install syslinux
Syslinux -- stupid/dev/sdb1
Dd If =/usr/share/syslinux/MBR. bin of =/dev/SDB
CP/Media/ISO/isolinux. bin/Media/boot/syslinux. Bin
CP/Media/ISO/isolinux. cfg/Media/boot/syslinux. cfg
CP/Media/ISO/isolinux/vmlinuz/Media/boot
CP/Media/ISO/isolinux/initrd. img/Media/boot
Edit/Media/boot/syslinux. cfg
Default centos (note that this must correspond to the label centos below)
Prompt 0
Label centos
Kernel vmlinuz
Append initrd = initrd. IMG method = HD: sdb2 :/
# Content fragment end
Umount/Media/boot
Disconnect from the VM:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/34/39/wKioL1OqrRODI2MvAAIRmldNLIE210.jpg "Title =" .png "alt =" wkiol1oqrrodi2mvaairmldnlie210.jpg "/>
Boot with a USB flash drive. normal;
However, in win7 "my computer", only the first partition is displayed, and the partitions 5, 6, and 7 are not displayed. disk management includes:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/34/3A/wKioL1OqrkOhk4PtAACrNA-4HcQ861.jpg "Title =" .png "alt =" wKioL1OqrkOhk4PtAACrNA-4HcQ861.jpg "/>