Author

Topic: USB drive crash on shutdown, need advice. (Read 975 times)

legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
April 24, 2012, 02:14:33 AM
#13
The OP never specified what OS he's using.

It doesn't even get to the linux main screen.

You're absolutely right. If he's using something other than Linux (and he never said he was), that would explain why it doesn't get to the Linux main screen. Roll Eyes
newbie
Activity: 13
Merit: 0
The OP never specified what OS he's using.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Class 4 vs Class 10 is nonsense.   

The class rating is for SD not USB drives and it merely indicates the minimum sustained write rate.
member
Activity: 86
Merit: 15
Thanks, I will look for the class 10 as well.  Maybe that will solve the problem.  Worth a shot anyway. 
full member
Activity: 196
Merit: 100
Web Dev, Db Admin, Computer Technician
With flash media there are different Class types. Class 4 will drop some bits when writing to the flash medium. For pictures it may not be a big deal if there is a little missing data, but for binary files and Operating Systems it is a nightmare. To prevent this, make sure you purchase Class 10 flash media, which will preserve all of your bits when writing to the media. When you buy cheap flash media you get what you pay for unfortunately, and Class 4 is the cheapest. Currently, Class4 2GB Micro SD cards sell for $2-$4 while Class 10 2GB Micro SD cards sell for $4-$6 dollars each.

I'm writing this from an OS installed on a 16GB Micro SD card and have been running this computer for 5 months like this. This is my minimalist phase.
full member
Activity: 140
Merit: 100
You should try to cool it down with a USB cooling system.
I do this and now my USB never crashes like before.
member
Activity: 86
Merit: 15
I will check the usb ports and use the native ones like you said.  I use patriot axle on 4 machines and flex on the other. They all crash so maybe it is time for a switch too.   My freind has the same problem with his so maybe using the native ports and these drives that DT uses along with the proper shutdown commands will  solve the problem .  I like the pxe idea !   I am sure we are right there with you on hours of wasted time. 
donator
Activity: 1218
Merit: 1079
Gerald Davis
You may just want to try a different brand drive.

I was using these (because I got a great deal on about 20 of them):
http://www.amazon.com/Verbatim-Flash-Drive-96816-Purple/dp/B001UHTDS2/ref=sr_1_2?ie=UTF8&qid=1334762142&sr=8-2

Complete garbage.  Would get corrupt, often fail to boot, occasionally the filesystem would go read only (which creates lots of fun bugs) and a couple of them simply died (less than 6 months mining).  I wasted way more hours than I care to admit trying to get them stable.

I switched to these:
http://www.amazon.com/SanDisk-Cruzer-Flash-Drive-SDCZ36-004G-B35/dp/B001XURP7W/ref=sr_1_10?ie=UTF8&qid=1334762229&sr=8-10

Haven't had a single corrupted filesytem or boot problem in 3+ months. (knock on wood).


Also (and this may just be superstition) I have found the best luck w/ the USB ports closest the the keyboard connector.  Usually they tend to be native southbridge ports and not 3rd party controller (to add more ports).

The other option which I am exploring now is PXE and boot from LAN where the rig simply boots an image from a PXE server over the network.  No drives even needed just connect power and network.

newbie
Activity: 7
Merit: 0
Another possibility is a flaky USB port. You need to do some testing with a different USB drive.
member
Activity: 86
Merit: 15
Rattus, thanks  I will try that.   Foxpup,  I need to be a bit more clear as my post may be a bit confusing.   After I shut it down normally (sudo shutdown now),  then it won't come back up, just the no bootable device screen or random scrolling.   Doesn't happen everytime, but  more often do I find myself up late rewriting the drive, than luckily it coming back to life. 
legendary
Activity: 4542
Merit: 3393
Vile Vixen and Miss Bitcointalk 2021-2023
In case the above doesn't work, there's always the Magic SysRq key:

Hold down Alt+SysRq and press (in order):
R to unraw the keyboard (otherwise killing X Windows may cause your terminal to behave strangely)
E to terminate all processes (this should dump you at a text-mode login prompt)
I to kill all processes not terminated by Alt+SysRq+E
S to sync mounted filesystems (IMPORTANT: wait until this step finishes before continuing!)
U to unmount all filesystems (again, wait until this step finishes before continuing!)
B to reboot the machine (or O to power it off) (NOTE: this is NOT SAFE unless you have performed the above steps!)

These commands are hard-coded into the kernel, and thus will work even if your system is completely hosed (unless the kernel itself has crashed, but absolutely nothing will save your drives in that case). Note that this should be considered a last resort only. "sudo shutdown now" or "sudo reboot" are completely safe and if they work you should use them.

Note also that none of these things will protect your drive if it's already screwed up, which is evidently the case if you're getting "no boot device recognised". Your original post leaves me a bit confused as to exactly what is happening. Does it crash when you try to shut down, or does it shut down normally and then crash the next time you boot it up? Or am I misunderstanding the situation completely and need more caffeine?
hero member
Activity: 792
Merit: 1000
Bite me
sudo sync
sudo shutdown -h now
should do it
member
Activity: 86
Merit: 15
Just wondering if anyone has any advice on what I can do to prevent my usb stick from corrupting when I shut it down. Any time I need to regrease a card or change a fan I shutdown,  and better than half the time, the usb is corrupt/messed up and won't get back to a terminal window again.  It doesn't even get to the linux main screen.  It will say something like "no boot device recognized" or sometimes it turns into real little script and scrolls the screen.   I shutdown by either holding down power button, turning power off at psu, or a sudo shutdown now and all get the same result.  Any ideas?
Jump to: