Can't create successful USB key for CentOS 7 install

General support questions
Post Reply
josephpford
Posts: 2
Joined: 2015/07/26 03:56:09

Can't create successful USB key for CentOS 7 install

Post by josephpford » 2015/07/26 04:09:05

I'm currently on an Ubuntu machine trying to create a USB drive of CentOS 7 so I can replace my Ubuntu OS with CentOS. I first tried to use unetbootin to create the installation and it didn't work and after googling found I should have used dd. I then tried to use gparted to wipe my usb and then dd to install Centos to the usb but when I reboot the computer and try to boot from USB the computer just immediately restarts over and over. I have to pull the usb out of the port for the computer to boot back to Ubuntu. I also saw somewhere online that gparted can be known to mess up a usb key so I tried a second usb key. This time I just dd'ed the Centos 7 installation to the usb key without doing anything in gparted. Same thing, just cycles over and over.

I tried md5sum'ing the ISO and it matches the md5sum on the website.

I don't know if I can md5sum a usb key and don't know how to do it if it's even possible.

Any ideas?

Here are some stats:
Lenovo 11s
1.5 Ghz Core i5
4GB ram
128 GB ssd

I thought maybe the bios booting to USB is messed up, but I can still use my Ubuntu USB key to load the Live Ubuntu installation from USB. So I can still use USB booting.

Thanks for any help you can provide. I'd really like to try CentOS because it's what my work uses for most of their servers.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Can't create successful USB key for CentOS 7 install

Post by avij » 2015/07/26 04:51:16

How you have previously partitioned your USB key is (or should be) irrelevant. You are supposed to dd to the entire USB key, overwriting any existing partition tables in the process. The image contains the partition table.

Please confirm that you have used dd if=CentOS.iso of=/dev/sdb (entire device) instead of of=/dev/sdb1 (first partition of the USB key), replacing sdb with the device name of your USB key, of course.

You can test the md5sum of your USB key with dd if=/dev/sdb bs=1048576 count=x | md5sum, where x depends on the .iso image used:

CentOS-7-x86_64-DVD-1503-01.iso : 4111
CentOS-7-x86_64-Everything-1503-01.iso : 7240
CentOS-7-x86_64-Minimal-1503-01.iso : 636
CentOS-7-x86_64-NetInstall-1503.iso : 360

josephpford
Posts: 2
Joined: 2015/07/26 03:56:09

Re: Can't create successful USB key for CentOS 7 install

Post by josephpford » 2015/07/26 13:04:05

Thank you for your help.

Yes, I used the following to run the dd command (exactly as typed)

Code: Select all

md5sum CentOS-7-x86_64-DVD-1503-01.iso 
99e450fb1b22d2e528757653fcbf5fdc  CentOS-7-x86_64-DVD-1503-01.iso
sudo dd if=CentOS-7-x86_64-DVD-1503-01.iso of=/dev/sdb
I don't have the history where the dd output gives you the bytes written and such, but I received no errors.

Here's the output you asked for.

Code: Select all

sudo dd if=/dev/sdb bs=1048576 count=4111 | md5sum
[sudo] password for jford: 
4111+0 records in
4111+0 records out
4310695936 bytes (4.3 GB) copied, 260.624 s, 16.5 MB/s
99e450fb1b22d2e528757653fcbf5fdc  -
In my bios settings should this be a UEFI or a Legacy boot?

Post Reply