[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Custom cd's



On Thu, May 30, 2002 at 11:20:21AM -0400, Ed Street wrote:
> Hello,
> 
> I was wondering if anyone know of any methods where I could customize a
> debian cd set with just the packages I want and scaled down so it would
> fit on a mini and/or business card/credit card cd.  To give you some
> idea the size requirments
> Full cd = 650 megs
> Mini cd = 180 megs
> biz card cd = 51 megs
> Credit card cd = 52 megs
> 
> Note these are the capacity of the blanks that I use and the size/shape
> does vary on the latter 2.

There is <http://cvs.debian.org/boot-floppies/i386-specials/mini-iso.sh>
which creates an ISO with base-only pkgs, from basedebs.tar.
Alternatively I wrote this little script that lets you put whichever
debs you want on there.  Tried it with the b-f2.4 flavour.  With just
the base debs on there the ISO is 31MB.  It doesn't provide any way to
automatically install non-base debs that are on the ISO, but you can
always apt-get install them once the system is up.

Richard

#!/bin/sh

# You should have a dir $DEBS containing all the .debs you want on
# the ISO.  You should have at least the base debs, as listed by
#
#	debootstrap --arch i386 --print-debs woody
#
# You might populate that dir by grabbing basedebs.tar from the archive.
# You should have a copy of the boot-floppies dir from an archive in
# $DISKS, and set $FLAVOUR to the one you want on your ISO (e.g. bf2.4)

set -e

DEBS=./debs
DISKS=/mirror/debian/dists/woody/main/disks-i386/current
FLAVOUR=bf2.4
ISO=mini.iso
WORKDIR=./work

rm -f $ISO
rm -rf $WORKDIR
mkdir -p $WORKDIR
( cd $WORKDIR; ln -s . debian )
mkdir $WORKDIR/.disk
echo "Debian GNU/Linux 3.0 prerelease Woody ($(date '+%Y%m%d'))" > $WORKDIR/.disk/info
touch $WORKDIR/.disk/kernel_installable
touch $WORKDIR/.disk/base_installable

mkdir -p $WORKDIR/pool
cp $DEBS/* $WORKDIR/pool

mkdir $WORKDIR/boot
mkdir -p $WORKDIR/dists/woody/main/disks-i386/current/images-1.44/$FLAVOUR
cp $DISKS/images-2.88/$FLAVOUR/rescue.bin $WORKDIR/boot
cp $DISKS/images-1.44/$FLAVOUR/rescue.bin $WORKDIR/dists/woody/main/disks-i386/current/images-1.44/$FLAVOUR
mkdir -p $WORKDIR/dists/woody/main/disks-i386/current/$FLAVOUR
cp $DISKS/$FLAVOUR/drivers.tgz $WORKDIR/dists/woody/main/disks-i386/current/$FLAVOUR

mkdir -p $WORKDIR/dists/woody/main/binary-i386

cat > $WORKDIR/dists/woody/main/binary-i386/Release << EOF
Archive: woody
Component: main
Origin: Debian
Label: Debian
Architecture: i386
EOF

( cd $WORKDIR;
  dpkg-scanpackages pool /dev/null > \
        dists/woody/main/binary-i386/Packages
  cd dists/woody
  cat > Release << EOF
Origin: Debian
Label: Debian
Suite: testing
Codename: woody
Architectures: i386
Components: main
Description: Debian Woody - Not Released
EOF
  echo DATE: `date -R` >> Release
  echo md5sum: >> Release
  for i in Release Packages
  do
    echo '' `md5sum main/binary-i386/$i | \
        cut -d' ' -f1` `wc -c main/binary-i386/$i` >> Release
  done
)

mkisofs -J -r -b boot/rescue.bin -o $ISO $WORKDIR


Reply to: