Allowing USB devices to persist through reboots

Monday, March 31st, 2008 at 5:13 pm

As some of you out there in Linux land may know, after a Linux based computer goes through hibernation, it re-initialises all of the USB devices connected which means that things are probably going to be in different spots, or in the case of something being mounted it will place the new device in the next slot along as the mount is keeping that spot occupied. This is definitely agitating on some devices where you require for example your home directory to be mounted on a USB device.

I personally mount my home directory on a USB device on my eeePC (the internal SDcard slot is USB connected) which means that if I hibernate and then restore, my home directory is disconnected and all sorts of filesystem errors are thrown up. How boring.

There is, however, a solution to this problem as recently talked about on the Melbourne Linux Users Victoria mailing lists. You simply need to recompile your kernel (2.6.21 or later I believe) with the option CONFIG_USB_PERSIST=y in your kernel config. This is listed as being experimental but it lets me now use the eeePC as I require – fast restoration from hibernation rather than waiting for the reasonably long boot time on the device. This means for me 18seconds to desktop from power-on, an extra 4GB for my home directory, and Debian – not bad!

Debian eeePC wiki

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>