Failed (boot) USB drive

Issues related to hardware problems
Post Reply
Jayphen
Posts: 3
Joined: 2014/09/11 02:06:19

Failed (boot) USB drive

Post by Jayphen » 2014/09/11 02:13:58

I recently had a power outage, and after restarting, my server booted in to emergency mode with the following message (excuse the image)

Image

I assume that the USB key that CentOS is installed on has failed. I tried a different USB key with Ubuntu on it and it was fine, so it doesn't seem to be the USB controller that is the issue.

Do I have any chance of repairing the filesystem, or recovering the data on it? If I install CentOS on a new USB key, will it be possible for me to copy config from the failed drive?
Last edited by Jayphen on 2014/09/11 09:38:08, edited 1 time in total.

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

Re: Failed (boot) USB drive

Post by TrevorH » 2014/09/11 08:00:08

All useful information in your graphic is on the right hand side of the picture where it cuts off.
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

Jayphen
Posts: 3
Joined: 2014/09/11 02:06:19

Re: Failed (boot) USB drive

Post by Jayphen » 2014/09/11 09:38:46

TrevorH wrote:All useful information in your graphic is on the right hand side of the picture where it cuts off.
Thanks, I've fixed that.

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

Re: Failed (boot) USB drive

Post by TrevorH » 2014/09/11 11:00:24

You might try booting from DVD or different rescue media and running fsck against the filesystems on the USB stick but they're not very reliable and are prone to failure so I'm not sure how confident of success I would be. Whether you can retrieve any information from it depends entirely on how badly it has failed.
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

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

Re: Failed (boot) USB drive

Post by avij » 2014/09/11 21:41:10

I would try copying the OK bits to a different USB drive first with a dd if=/dev/sdb of=/dev/sdc bs=4096 conv=sync,noerror, where sdb is the failed USB drive and sdc is the device name for an unused (empty) USB drive. Please check the device names, so you don't accidentally overwrite your hard disk or something equally bad. If you then run fsck on the filesystem(s) on the newly duplicated USB drive, fsck might have better chances of repairing the filesystem, because it can now write to blocks that were previously inaccessible.

Jayphen
Posts: 3
Joined: 2014/09/11 02:06:19

Re: Failed (boot) USB drive

Post by Jayphen » 2014/09/12 02:11:35

Thanks guys. I ended up buying a new thumb drive and starting from scratch.

I later attempted to format the drive using diskutil on my Mac and it also failed. I think the USB key is dead.

Post Reply