Antony,

i do it the whole generation of a CDROM with a script, so I don't have 
to remember all this stuff ;-)

Here is the relevant part of it:

# where the needed modules are
modules=../download/Bering_1.0-rc3_modules_2.4.18.tar.gz 

# modules needed during boot
#
initrd_mods="
 ./modules/drivers/cdrom/cdrom.o       \
 ./modules/drivers/ide/ide-mod.o       \
 ./modules/drivers/ide/ide-cd.o        \
 ./modules/drivers/ide/ide-probe-mod.o \
 ./modules/fs/isofs/isofs.o"

#--------------------------------------------------------------------------
# create and clean directories
#
mkdir -p $tmp
mkdir -p $tmp/diskcontent
rm -rf $tmp/diskcontent

#--------------------------------------------------------------------------
# create mount points
#
mkdir -p $tmp/mnt/image
mkdir -p $tmp/mnt/initrd

#--------------------------------------------------------------------------
# mount the floppy image
#
mount -t msdos $img $tmp/mnt/image -o loop -o ro


#--------------------------------------------------------------------------
# unpack initrd and mount it,
#
echo "Unpacking: initrd"
cp $tmp/mnt/image/initrd.lrp $tmp/diskcontent
gunzip -S .lrp $tmp/diskcontent/initrd.lrp
mount -t minix $tmp/diskcontent/initrd $tmp/mnt/initrd -o loop

#--------------------------------------------------------------------------
# unpack needed modules into $tmp
echo "Unpacking: modules"
cat $modules | (cd $tmp; tar zxf -)

#--------------------------------------------------------------------------
# copy modules needed during boot to initrd (at least cdrom & ide),
# and add names (without .o) to /boot/etc/module
#
echo -n "Initrd modules:"
for mod in $initrd_mods; do
    m=`basename $mod | sed -e 's/\.o$//'`
    echo -n " $m"
    (cd $tmp; cp $mod $tmp/mnt/initrd/boot/lib/modules)
    echo $m >> $tmp/mnt/initrd/boot/etc/modules
done
echo ""

#--------------------------------------------------------------------------
# umount initrd and pack it
#
echo -n " initrd"
umount $tmp/mnt/initrd
gzip -S .lrp $tmp/diskcontent/initrd
echo ""

#--------------------------------------------------------------------------
# umount image
umount $tmp/mnt/image





-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to