[ltp] running from ram

Laurent Gilson linux-thinkpad@linux-thinkpad.org
Tue, 10 Jan 2006 00:48:25 +0100


Hello

> I'm considering a setup where I run only from ram...

I'm using such a setup (R51, PM725, Radeon 7500). The powersave is minimal  
(+30 min runtime), but the silence (no HD, no fan) is stunning.

I used 1 GB RAM, squashfs, unionfs and a handcrafted initrd. Basicly i  
compressed /lib, /sbin, /bin, /var, /opt and /usr using squashfs (total:  
~500 MB). At startup a script in initrd creates a ramfs. It copies the  
image-files into the ramfs and mounts them. var is made rw using unionfs.  
home and etc are copied w/o compression.

After that i tell hdpram to switch off the HD, switchroot into the ramdisk  
and continue normal startup.

At shutdown home and etc are copied back.

The HD is still mounted under /mnt/realRoot, so using big files is no  
problem.

If i need a lot of RAM or want to install stuff i reboot w/o my initrd.  
Rebuilding the squashfs-images takes about 10 min.

> Experiences?

- Buy 2 GB RAM. I had to strip down my system, removing KDE and other  
bloatware in the progress.

- The startup takes 2x time. The stock-HD is so slow, coping 550 MB takes  
ages.

- Suspending to disc is a BAD idea. (suspend to RAM works fine).

- Always keep 15 min runtime in reserve. Running out of power while coping  
back /home is bad and f**ks-up ext3 hard.

cu