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.

How can I make my computer sleep but not automatically change the state of the USB flash drive I am using? I have it mounted on / because my hard drive broke, and whenever my computer wakes up it remounts as a read-only FS and I need to run fsck on reboot. haw can I avoid this? the flash drive is /dev/sda2 and the filesystem is ext4.

share|improve this question

1 Answer 1

I'm not sure it would works well with USB 'flash' drive, but here's similar question and answer from SE.

http://unix.stackexchange.com/questions/5211/prevent-a-usb-external-hard-drive-from-sleeping

I guess that using 'hdparm' with '-B 255' option is what you want.

share|improve this answer
    
from the hdparm wikipedia article: hdparm is a command line utility for the Linux and Windows operating systems to set and view ATA hard disk drive hardware parameters. It can set parameters such as drive caches, sleep mode, power management, acoustic management, and DMA settings. GParted and Parted Magic both include hdparm. –  Jakob Weisblat Nov 30 '12 at 13:56
    
so it wouldn't work with a flash drive. Also, I think (though I cannot access *.stackexchange because it is blocked at my school) that answer refers to preventing the drive itself from sleeping, not preventing the drive from being nonpeacefully disconnected when the computer sleeps. I could be wrong about that, however. Thanks anyway. –  Jakob Weisblat Nov 30 '12 at 13:58

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.