[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

How to Set Up a USB Key to Install CentOS

Starting with CentOS 6.5 and 7.0 the preferred way to create a USB stick to use as install media is by using dd (example below). You should always use the latest iso image for the version you want to install: currently 6.10, 7.8.2003 and 8.2.2004.

The CentOS Project publishes a full list of the sha256sums for each iso file. These can be found in the release notes for each new version and also in a text file located in the same directory that you obtained the iso image from. You should check that your downloaded copy has a sha256sum that matches the published one to eliminate corrupted media install problems. On Windows you can use the command certutil -hashfile c:\Users\JDoe\Downloads\CentOS-8.2.2004-x86_64-dvd1.iso SHA256 to perform this checksum. On linux, use the sha256sum command to do the same job.

1. Motivation

Many recent systems, particularly netbooks and small notebooks, may not have a CD or DVD drive and a network install may be difficult, impractical, or impossible, depending on network connectivity and installer support for the available network hardware. This procedure allows a CentOS install without network connectivity and with no media other than a bootable USB device and the target system disk.

2. CentOS release 6 (6.5 or newer) and CentOS 7 and 8

Starting with CentOS 6.5, one can install from USB keys by simply transferring the desired ISO using dd.

For example, assuming your USB stick is seen as /dev/sdz (please double check what yours is, do not blindly assume /dev/sdz as you may overwrite something irretrievably):

dd if=CentOS-6.5-x86_64-bin-DVD1.iso of=/dev/sdz

You must write to the entire device and not a partition on it (so, /dev/sdz not /dev/sdz1)

When asked for the media to install from, select "hard disk" and then the device corresponding to the USB key.

Make sure you select as destination the device corresponding to the USB key (/dev/sdz in the above example) and not a partition (such as /dev/sdz1)

Exactly the same method works for CentOS 7. Moreover, the CentOS 7 installer image has a special partitioning which, as of July 2014, most Windows tools do NOT transfer correctly leading to undefined behaviour when booting from the USB key.

Applications known (2019) that do NOT work are: unetbootin, multibootusb and universal usb installler - do NOT use these. Also Rufus does not work correctly if the wrong options are chosen so the tool is best avoided.

If you are experiencing problems installing CentOS from a USB stick and you used a utility other than dd on linux or the 4 listed above as 'working', then recreate it with one known to work before you try anything else.

If using a version of Windows newer than 7, make sure you unmount the USB drive first (formatting it prior to launching the disk copier is one way to accomplish that), otherwise Windows might refuse to write on the stick, bailing out with the "can't write to drive" error message.

If using dd for Windows, run dd --list and look carefully at the list of NT Block Device Objects and use the one that looks like \\?\Device\Harddisk1\Partition0 where the description is something like Removable media other than floppy. Block size = 512. Be very careful about which output device you pick or you may overwrite something you did not intend to! On my machine I ran dd if=CentOS-7.0-1406-DVD.iso of=\\?\Device\Harddisk1\Partition0 - your device names and command may vary accordingly!

3. Previous versions of CentOS 6

The first thing you should do is ask yourself "What on earth am I doing, installing something that is more than 5 years old?". Beware that only the very latest CentOS releases are supported. We strongly advise you to not install anything but the latest minor release. Therefore the following methods should no longer be attempted unless you have a very very good reason to install an old and unsupported release.

An end user recommends the following approach for CentOS-6, using livecd-iso-to-disk from livecd-tools with DVD1. This has been tested with livecd-tools-13.4-1.el6 from EPEL. Thanks to forum user AndrewSerk for the recommendation in a forum post. See also the notation of a need for installation of qemu in this mailing list post.

3.1. Older Method

Now removed as no-one should install CentOS versions older than 6.5



2023-09-11 07:22