Low ram machines and *.dsl extentions


Forum: Other Help Topics
Topic: Low ram machines and *.dsl extentions
started by: henk.1955

Posted by henk.1955 on Feb. 04 2005,10:41
If you have a low ram machine. and want to use *.dsl exention. you may run soon out of memory.
i have made a small change to the /etc/init.d/mkwriteable script to use a ext2 partition instead of ramdisk.
Code Sample
#!/bin/sh
# Original author:  cbagger01 from the Damn Small Linux forum
#
# 04/09/04          modified for use in DSL by RobertS
#

# changed to use ext2 hdpartition instead of ramdisk
# /cdrom is the ext2 partion i boot from

WRITEABLE_DIR=/cdrom/writeable

if [ -f /etc/sysconfig/writeable ]; then
   exit
fi    
INSTALLED=""
[ -e /KNOPPIX/bin/ash ] || INSTALLED="yes"
if [ -z "$INSTALLED" ]; then

   rm -rf $WRITEABLE_DIR
   mkdir $WRITEABLE_DIR
   
   cp -srd /KNOPPIX/usr/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/usr/X11R6/lib/X11 $WRITEABLE_DIR/usr/lib/
   ln -sf $WRITEABLE_DIR/usr /

   cp -srd /KNOPPIX/bin/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/bin /
   cp -srd /KNOPPIX/boot/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/boot /
   cp -srd /KNOPPIX/lib/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/lib /
   cp -srd /KNOPPIX/sbin/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/sbin /

#    rm -rf /ramdisk/var/cache/apt
#    cp -srd /KNOPPIX/var/cache/apt/ /ramdisk/var/cache
#    rm -rf /ramdisk/var/cache/apt/archives/lock
#    cp /KNOPPIX/var/cache/apt/archives/lock /ramdisk/var/cache/apt/archives
#    rm -rf /ramdisk/var/lib/apt
#    cp -srd /KNOPPIX/var/lib/apt/ /ramdisk/var/lib
   rm -f /var/lib/dpkg  
   
   
   cp -dpR /ramdisk/var/ $WRITEABLE_DIR
   ln -sf $WRITEABLE_DIR/var /

#    mkdir $WRITEABLE_DIR/var
#    mkdir $WRITEABLE_DIR/
#    mkdir $WRITEABLE_DIR/var/lib
   
   rm -rf $WRITEABLE_DIR/var/cache/apt
   cp -srd /KNOPPIX/var/cache/apt/ $WRITEABLE_DIR/var/cache
   rm -rf $WRITEABLE_DIR/var/cache/apt/archives/lock
   cp /KNOPPIX/var/cache/apt/archives/lock $WRITEABLE_DIR/var/cache/apt/archives
   rm -rf $WRITEABLE_DIR/var/lib/apt
   cp -srd /KNOPPIX/var/lib/apt/ $WRITEABLE_DIR/var/lib
   rm -f /var/lib/dpkg

   touch /etc/sysconfig/writeable
fi

i put this script in /opt ( and filetool.lst)
and add
Code Sample
echo "mkwriteable ..."
/opt/mkwriteable
to bootlocal.sh

then i make sure NOT to load any mydsl extention at boot time.

Posted by mikshaw on Feb. 04 2005,15:00
nice!

I'm thinking about making a new ext2 partition.
What about once the files are copied?  Can I remove the cp lines and just link the directories next time I boot?

Posted by henk.1955 on Feb. 04 2005,16:05
Quote
What about once the files are copied?  Can I remove the cp lines and just link the directories next time I boot?
that may be posible. it would speedup the next time you boot.
but then you get a mix between livecd/frugal/poormans and hdinstall, i would not go for that.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.