How to install centos using bootable USB pendrive

Installing CentOS using USB pendrive is not straight forward like installing from DVD ROM or PXE. You also need to specify the path of centos iso file to installer.

I have used pendrive of 16GB to create FAT32 partition of size 9GB for centos bootable installer and second is EXT3 partition of size 5GB containing centos6 ISO. Steps below will guide you the procedure.

Step 1.
Preparing Pendrive:
Check if inserted pendrive is automatically mounted, unmount it if so.

Step 2.
Create 2 partitions on the USB pendrive:
First partition is FAT32 of about 9GB. (For creating bootable USB)
Second partition is EXT3 of about 5GB. (An ext3 partition is required, because the size of centos ISO file is larger than the maximum filesize a FAT32 or VFAT supports.)

Format first partition as FAT32 and second as EXT2.

Step 3.
Download and copy the centos .iso file to /media/DATA/centos.

Umount USB pendrive by right clicking it's icon in GUI and selecting "Safely Remove Drive".

Step 4.
Carry same disk to windows machine to create a centos bootable image using Universal-USB-Installer- utility.

Download the PenDriveLinux “Univerals USB Installer” from

Ensure that USB pendrive is inserted into your computer and run the exe.
Step 1: Select CentOS from the dropdown to put on USB.
Step 2: Click “Browse” to select the CentOS ISO. Type in * and hit enter to list all files. Select CentOS ISO and click “open”.
Step 3: Select USB Flash drive letter, and click create to start boot disk creation process.

When it’s done, move the USB pendrive to target system, and set USB as first boot option.

Step 5.
On target machine follow the step to complete centos installation:

Plug USB drive in server and select boot from USB.
Select language, keyboard, username, password etc.
After partitioning, installer ask's whether to install the Grub boot loader and location to install it.
Then when it asks for installation media source, select “Hard Drive”. You will be prompted for where the ISO images are located (/dev/sda, /dev/sdb, /dev/sdc, etc), select the one corresponding to the USB drive.

Note: By default installer is looking for the centos iso on the first partition (i.e. /dev/sda1) of USB pendrive, but it's on the second partition. so, you may get error message "The installer has tried to mount image #1, but cannot find it on the hard drive".
To fix the issue, Go to shell terminal pressing Ctrl+Alt+F2, check current mount points using "mount" command, then, unmount the first partition of the USB. Since we have copied centos iso onto 2nd partition of USB, we have to correct it by "mount -t ext2 /dev/sda2 /mnt/isodir" from command prompt.

- Check for current mount points:

- Unmount /dev/sda1

- Mount the second partition of USB drive, which contains the centos ISO installer is looking for.

Once mounted, switch back to the installer using Ctrl+Alt+F6 and click Retry to continue installation.

You may also like...

  • Pingback: max()

%d bloggers like this: