0

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.

1 Answer 1

1

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

https://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.

2
  • 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. Nov 30, 2012 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. Nov 30, 2012 at 13:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .