Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a bootable USB Linux. Occasionally, someone will disconnect the USB power and bash would complain any command was not found. Even if I reconnect the drive, dmesg said the drive has been detected, all the commands were still unusable. Any way to remount the root partition without reboot?

share|improve this question
add comment

1 Answer

You could try the remount option: mount -o remount, which is also used to e.g. make a read-write filesystem read-only (remount it read-only). This should force mount to renew the connection. For details, just take a look at man mount.

share|improve this answer
    
Thanks for the answer, but I'm not sure if mount command is available after this catastrophic event happen. I'll try it out next time when this happens. –  Patrick Jul 4 '12 at 16:52
    
Indeed, this does not work for me when the pen drive is pulled out and plugged back in. I get a bunch of "command not found" error messages when I try to sudo mount -o remount / –  Joey Adams Feb 13 '13 at 6:56
    
@JoeyAdams behaviours differs with e.g. different file systems and other conditions. I remember e.g. broken Samba shares where a hard case, as sometimes the system won't let go of the "old mounts" (the broken ones), and thus you could not renew them. I have no "100% sure" solution, sorry -- which is why I wrote "You could try". Sometimes it does work, other times it does not... –  Izzy Feb 13 '13 at 7:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.