[ltp] Suspend-to-ram with / mounted from USB

Laurent Gilson linux-thinkpad@linux-thinkpad.org
Sun, 05 Nov 2006 19:41:35 +0100


Hello,

> 1)Try putting root on a CF card, and buy a 1GB card + CF->mini-IDE  
> adapter for about $30. Then replace your HDD with it.

i had that plan too but CF tend to wear out pretty quickly if used as  
/var, /home or /tmp. Right now these are saved on HD on copied into a  
ramfs at startup => 0 writes on flash in normaler operation. Only software  
installs/upgrades/removes wirte to the stick.

Maybe copying the often-changed files from the CF into a ramdisc and  
writing them back at shutdown is the right way. But then i will have to do  
something about my windows. Is it possible to insert a CF into a  
ultrabay-HD adapter ?

> 2)You need to edit your suspend scripts to allow the usb key to be  
> unmounted before suspend, and remounted thereafter.

The stick contains a squashfsed image of /usr (/opt, /sbin and /bin will  
follow). I cannot umount /usr w/o stopping each and every prog using files  
 from /usr, like the Xserver ... Or is there a way to freze these progs and  
free the mount ?

> Obviously, you can't do that with / on the usb key. So, try putting / on  
> a ramdisk.

Already done that. But it does not change my problem: files saved on the  
stick are open at suspend and needed after resume. It does not matter if  
itīs /usr or /.

I had everything in a ramdisc. That works (including suspend-to-ram) but  
eats 550-600 MB of RAM and is painfully slow to start.

Thanks.