Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Low ram machines and *.dsl extentions, alter mkwriteable to use hdisk< Next Oldest | Next Newest >
henk.1955 Offline





Group: Members
Posts: 41
Joined: Feb. 2005
Posted: Feb. 04 2005,10:41 QUOTE

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.
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 04 2005,15:00 QUOTE

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?


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
henk.1955 Offline





Group: Members
Posts: 41
Joined: Feb. 2005
Posted: Feb. 04 2005,16:05 QUOTE

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.
Back to top
Profile PM WEB 
2 replies since Feb. 04 2005,10:41 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Low ram machines and *.dsl extentions

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code