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: Scripts for RAM re-mastering, Using 2 USB pen drives, no CDs to burn!< Next Oldest | Next Newest >
NorthBear Offline





Group: Members
Posts: 2
Joined: Jan. 2005
Posted: Jan. 05 2005,23:18 QUOTE

I've been doing some DSL re-mastering lately. Things go very fast with
a pair of USB pen drives, no need to create the ISO and burn it.

I boot up DSL from the 'master' pen drive and create a remaster
directory in /home. I have my scripts on the pen drive, so I copy them
into the ramdisk:

mkdir /home/remaster
cd /home/remaster
cp -Rp /cdrom/scripts .

I setup the re-master:

cd scripts
dsl-remaster /home/remaster

I make my changes to things under /home/remaster/source, then:

cd /home/remaster/scripts
dsl-create /home/remaster

This scripts creates the compress "KNOPPIX" filesystem on the
second USB pen drive. If I want a more permanent copy, I use the
script dsl-mkiso to create the re-mastered ISO on a mounted hard
drive partition for later burning to a CDR.

Here are the scripts:

dsl-remaster...

#!/bin/bash
if [ -z "$1" ]; then
   echo "Usage: dsl-remaster directory"
   exit
fi

echo "Removing source and newcd directories from $1"
rm -rf $1/source $1/newcd

echo "Creating source and newcd directories in $1"
mkdir $1/source
mkdir $1/newcd
mkdir $1/newcd/KNOPPIX

echo "Copying files from /cdrom"
cp -p /cdrom/boot.msg     $1/newcd
cp -p /cdrom/f2           $1/newcd
cp -p /cdrom/f3           $1/newcd
cp -p /cdrom/german.kbd   $1/newcd
cp -p /cdrom/ldlinux.sys  $1/newcd
cp -p /cdrom/linux24      $1/newcd
cp -p /cdrom/logo.16      $1/newcd
cp -p /cdrom/minirt24.gz  $1/newcd
cp -p /cdrom/syslinux.cfg $1/newcd

echo "Copying files from /KNOPPIX"
cp -Rp /KNOPPIX/*         $1/source

echo "Flushing disk cache"
sync

dsl-create...

#!/bin/bash
if [ -z "$1" ]; then
   echo "Usage: dsl-create directory"
   exit
fi

cd $1

if [ -d /mnt/sdd1/knoppix ]; then
   echo "Creating custom compressed filesystem from $1/source in /mnt/sdd1/knoppix"
   mkisofs -R source | create_compressed_fs - 65536 > /mnt/sdd1/knoppix/knoppix
else
   echo "ERROR: Please mount /mnt/sdd1!"
fi

echo "Flushing disk cache"
sync

cd -

dsl-mkiso....

#!/bin/bash

if [ -d /mnt/hda2/dsl/newcd ]; then
   if [ -d /mnt/sdd1/knoppix ]; then
       echo "Copying KNOPPIX filesystem to /mnt/hda2/dsl/newcd/KNOPPIX"
       cp /mnt/sdd1/knoppix/knoppix /mnt/hda2/dsl/newcd/KNOPPIX/KNOPPIX
   else
       echo "Please mount /mnt/sdd1!"
       exit
   fi
   cd /mnt/hda2/dsl
   echo "Making /mnt/hda2/dsl/custom-dsl.iso"
   mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o custom-dsl.iso newcd
else
   echo "Please mount /mnt/hda2!"
   exit
fi

echo "Flushing disk cache"
sync

cd -

Overall, nothing fancy, but it's been much faster and a lot more
comfortable to re-master using this technique.

Regards to all, thank you!
Back to top
Profile PM 
0 replies since Jan. 05 2005,23:18 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: Scripts for RAM re-mastering

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