Cannot boot CentOS on usb flash drive

General support questions
Post Reply
chuckliu
Posts: 5
Joined: 2014/08/08 05:47:44

Cannot boot CentOS on usb flash drive

Post by chuckliu » 2014/08/08 05:54:22

While I was using CentOS 6, I map the whole flash drive as a disk in VMWare.
Then I install CentOS on it.
This flash drive can boot on any computer.

I did the same thing with CentOS 7.
It can only boot from VMWare.
While I put it into another computer, it can show the boot screen, but cannot boot into OS.
I use blkid to see the disk, I cannot find the flash drive.
It looks like USb storage driver is not loaded.

Any ideas what I should do?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot boot CentOS on usb flash drive

Post by TrevorH » 2014/08/08 09:17:44

Try editing /etc/dracut.conf and changing it so that it says hostonly = no. You'll then need to rebuild the initramfs and make sure you have enough space in /boot to cater for multiple copies of a ~40-50MB file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

chuckliu
Posts: 5
Joined: 2014/08/08 05:47:44

Re: Cannot boot CentOS on usb flash drive

Post by chuckliu » 2014/08/08 18:57:21

Thanks, it works!
But change hostonly in /etc/dracut.conf is useless because it will be overridden by /usr/lib/dracut/dracut.conf.d/01-dist.conf
So simply run dracut -N --force

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot boot CentOS on usb flash drive

Post by TrevorH » 2014/08/08 19:44:13

That sounds like a bug worthy of reporting on bugzilla.redhat.com - /etc/dracut.conf is meant for users to be able to override the other defaults, it shouldn't be ignored.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply