usb flash drive as swap in linux

Jeremy C. Reed reed at reedmedia.net
Wed Mar 15 13:23:26 MST 2006


On Wed, 15 Mar 2006, Technomage wrote:

> I have made the required changes to fstab in order to use a 128 meg USB 
> device.
> 
> only problem I seem to have is that even though the modules are loaded, it 
> will not initialize as swap space unless I issue a swapon -a from root after 
> startup.
> 
> some help would be greatly appreciated.
> 
> system is debian kernel 2.6.8-2-386 running on a compaq presario laptop.

Have a look at your /etc/rcS.d/ scripts to see when your swap is mounted.

Some (All?) Debian systems do it twice (but maybe still before your flash 
disk is available).

As a workaround, add a new rc?.d script to run your swapon -a after your 
new device is available.

I understand that flash disks do not like a lot of writing. Maybe use as a 
swap is a bad idea (since it could soon fail). Anyone else have experience 
with this? (How soon?)

 Jeremy C. Reed

echo '9,J8HD,fDGG8B@?:536FC5=8 at I;C5?@H5B0D at 5GBIELD54DL>@8L?:5GDEJ8LDG1' |\
sed ss,s50EBsg | tr 0-M 'p.wBt SgiIlxmLhan:o,erDsduv/cyP'


More information about the PLUG-discuss mailing list