Introduction to installing CentOS 6.5 using USB flash drives and network

Source: Internet
Author: User

I believe many people will be disappointed when I search for the CentOS 6 64-bit USB flash drive installation method on the Internet.

1. Copy and copy them.

2. After being made into a Linux boot disk by UltraISO and other software in Windows, the USB flash drive is automatically formatted as a FAT format, and thus a CentOS 64-bit ISO larger than 4 GB cannot be stored. After the machine is successfully guided to the installation interface, it cannot be installed because the ISO file cannot be found.

I am a Linux cainiao. I have used a USB flash drive to install CentOS in the past two days. The tutorials I checked online are all of the original versions. They are all started separately and then copied to iso. This is too troublesome. Finally, a simple method was found in the Wikipedia.

You can directly write the iso file to the USB flash disk from CentOS 6.5.

Windows:

1. Open iso with UltraISO (e.g., CentOS-6.5-x86_64-bin-DVD1.iso)

2. Then click "Boot"-> "Write hard disk image", hard disk drive is your U disk, Image File Installation CD iso, write mode is USB-HDD +, click "write" button. After installation, the USB flash drive is ready.

Linux platform:

Use the dd command to write the iso file to the USB flash drive. Dd if = iso file of = U disk. (Such as: dd if =/centos-6.5-x86_64-bin-DVD1.iso of =/dev/sdb1)

Note: after running the dd command, the replication status is not displayed. To view the replication status, open another terminal and enter "while killall-USR1 dd; do sleep 5; done" to view the replication status.

This method is 64-bit and 32-bit. I installed 64-bit.

Note: This method can be used only from CentOS6.5. The old method is used for versions 6.4 and earlier.

Many people may already know this method, but many tutorials on the Internet are still old ones. I wrote it to spread it, so that new users can avoid detours. Dislike, not spray

======================================

Previous solution: partition the USB flash disk in Linux,

----------------------------- The following is excerpted from the network -----------------------------------

1. Become a root user. Create a small VFAT partition (100 MB) and a large Linux partition on the U disk. Mark a VFAT partition as a startup partition.
Fdisk/dev/sdg
Run the "m" command in the fdisk program to view menu options. The command order is as follows:
(There is no annotation after ):
D # delete an existing partition. If necessary, repeat multiple times to delete multiple partitions.
N # create a new partition
P # primary Partition
1 # Partition Number 1
<Enter> # determine the start position of the partition and use the default value.
+ 100 M # The partition size is 100 M
T # Change partition type
1 # select a partition with Partition Number 1
B # type: VFAT
N # create a new partition
P # primary Partition
2 # Partition Number 2
<Enter> # determine the start position of the partition and use the default value.
<Enter> # determine the end of the partition. Use the default value.
A # Switch startup flag
1 # select a partition with Partition Number 1
W # Write all changes to the disk
Run the "fidsk-l" command to view the result, as shown in the following figure:
Disk/dev/sdg: 7948 MB, 7948206080 bytes
** Heads, ** sectors/track, ***** cylinders
Units = cylinders of ***** 512 = ******* bytes
Disk identifier :**********
Device Boot Start End Blocks Id System
/Dev/sdg1*1 ***** B W95 FAT32
/Dev/sdg2 ***************** 83 Linux
2. Create a file system:
Mkfs. vfat-n BOOT/dev/sdg1
Mkfs. ext2-m 0-B 4096-L DATA/dev/sdg2
After the disk is safely deleted, unplug the disk and then insert it into the disk. the partitions should be mounted separately.
In/media/boot and/media/DATA.
3. Copy the CentOS image file and the images folder in the image to the ext2 partition:
Cd/dir/of/iso/images # path of the image file
Mkdir/media/DATA/centos
Mkdir/tmp/cdimage
CentOS-6.0-i386-bin-DVD.iso/tmp/cdimage
Cp-v CentOS-6.0-i386-bin-DVD.iso/media/DATA/centos/; sync
Check the checksum of the copied file.
Cp-rv/tmp/cdimage/images // media/DATA/centos/
4. install and configure syslinux on the vfat partition and MBR:
Syslinux -- stupid/dev/sdg1 # Or syslinux-s/dev/sdg1
Subject
Dd if =/usr/share/syslinux/mbr. bin of =/dev/sdg # In Linuxdeepin
Mbr. bin is located in/usr/lib/syslinux/mbr. bin, which is subject to actual conditions. mbr. bin
It may be in another location.
Cd/media/BOOT
Cp-rv/tmp/cdimage/isolinux syslinux
Mv syslinux/isolinux. cfg syslinux/syslinux. cfg
Rm-f syslinux/isolinux. bin
Rm-f syslinux/vesamenu. c32
Cp-v/usr/share/syslinux/vesamenu. c32 syslinux/
Umount/tmp/cdimage
<Your-favorite-editor> syslinux/syslinux. cfg # Use your favorite document
The editor adds the statement after "append" in each area of the file:
Method = hd: sda2:/centos #
5. safely delete the U disk, shut down, boot again, and adjust it to start from the U disk.

----------------------------- The preceding contents are excerpted from the network -----------------------------------

The above method is not verified.

Since CentOS 6.5 was released, there is a very simple way to see here http://wiki.centos.org/HowTos/InstallFromUSBkey

Inspired by this, I used UltraISO in Windows to directly burn Disk1 (larger than 4 GB) of CentOS 6.5 64-bit ISO to a USB flash drive, instead of copying ISO to the root directory of the USB flash drive. Then, you can get the USB slot after the machine is inserted and choose to start from USB when the machine is started. The installation is successful step by step.

Note: During installation, You must select Custom Layout on the storage device selection page to manually create partitions and mount points, then, write the MBR information to the hard disk of the machine (instead of the USB disk, the MBR is written to the USB disk by default. As a result, the system is installed, the USB flash disk is unplugged, and the system startup interface cannot be accessed ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.