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

Re: [debian-knoppix] remastering 3.4



Hi Mark,

On Wed, May 12, 2004 at 04:02:40PM -0700, mark everton wrote:
> So now I want to make a remaster from 3.4. I have been
> told that that you use some scripts to build knoppix.

Not really, those are more hints for manual configuration. However, here
is a snapshot of what I use sometimes.

> I have found the old ones but they do not work. I
> guess because they are to old. 
> Can we have a newer version of those script please?

Attached are the scripts that (hereby the usual warning)

- will destroy your entire system,
- will make your computer and everything around it unusable,
- cause chaos and destruction,
- will invalidate every data you have ever produced and render your
  backups unreadable as well. Power will fail and your CDs will explode.

Just in case. You MUST modify these scripts before executing them, or
otherwise they are just going to destroy everything. Better delete the
attachments, unread. ;-)

Regards
-Klaus Knopper
PS: In case you wonder, I use a /KNOPPIX.build/create_compressed_fs instead
of the included create_compressed_fs on Knoppix just because the first
one is optimized for the specific processor on the remastering system,
and thus slightly faster. Also, check the new options of
create_compressed_fs for better (and way slower) 7zip-compression.
#!/bin/bash
# Restore initial system state, clean all temporary files

umask 022

# echo "Updating package lists..."
# pump; sleep 2
# perl -pi -e 's/^deb/#deb/g' /etc/apt/sources.list
# apt-get update >/dev/null 2>&1
# perl -pi -e 's/^#deb/deb/g' /etc/apt/sources.list


/etc/init.d/autofs stop
/etc/init.d/apmd stop
[ -x /etc/init.d/knoppix-terminalserver ] && /etc/init.d/knoppix-terminalserver deconfigure

# remove only "temporary" or saved files in the given directories
nuke(){
for i in `find "$@" -name \*.gz -o -name \*.bz2 -o -name \*.0 -o -name \*.0.log -o -name browse.dat -o -name \*.\*pk 2>/dev/null`; do
rm -f "$i"
done
}

# set all files in the given directories to a length of zero
zero(){
for i in `find "$@" -type f -size +0 -not -name \*.ini 2>/dev/null`; do
:> "$i"
done
}

rmdir /mnt/cdrom?* /mnt/hd?* /mnt/sd?* /mnt/ram* /mnt/sr* /mnt/miniroot /mnt/bootfloppy 2>/dev/null
rm -f /etc/ifstate /etc/X11/XF86Config /etc/X11/XF86Config-4 \
      /etc/XF86Config /etc/XF86Config-4 /etc/sysconfig/* \
      /etc/ssh/*key* \
      /etc/samba/*.SID /var/lib/samba/* /var/cache/samba/* /etc/samba/*.tdb \
      /dev/mouse* /dev/cdrom* /dev/cdwriter* \
      /var/run/*/* /var/run/* /var/log/ksymoops/* /var/lock/*/* /var/lock/* \
      /var/state/*/* /var/state/* /var/log/nessus/* /var/lib/nessus/* \
      /halt /reboot /ash.static /etc/dhcpc/*.info /etc/dhcpc/resolv* \
      /etc/resolv.conf /etc/*passwd- /etc/*shadow- /etc/*group- 2>/dev/null

mkdir -p /etc/sysconfig/network-scripts /etc/sysconfig/provider
cat >/etc/dhcpc/resolv.conf <<EOT
# insert nameservers here
# nameserver 127.0.0.1
EOT
chmod 644 /etc/dhcpc/resolv.conf
ln -s /etc/dhcpc/resolv.conf /etc/
rm -rf /tmp/* /var/tmp/* /var/tmp/.??* /var/backups/* /root/.??* /.??* /home/root/.??* \
	/home/*/.ssh /home/*/.bash_history \
       /home/knoppix/* /home/knoppix/.??* /var/lib/texmf/ls-R \
       /var/spool/texmf/ls-R /var/run/screen/* /var/spool/squid/* \
       /usr/share/applnk/System/Nessus.desktop \
       /usr/share/applnk/System/X-Terminal_as_root* \
       /usr/share/applnk/System/QTParted.desktop
nuke /var/log /var/cache /var/spool/texmf 
zero /var/local /var/log /var/spool /var/mail \
     /var/lib/games /var/cache/man /var/lib/wine \
     /var/lib/nfs /var/lib/xkb

for i in `find /usr/*/man -name \*.\[0-9ln\]` ; do
[ -f "$i".gz -o -f "$i".bz2 ] && rm -f "$i"
done

# delete old dowloaded packages
apt-get clean

# Strip X11 Libs
strip --strip-unneeded `find /usr/X11R6/lib/modules -name \*.so -o -name \*.o`

# Recreate empty utmp and wtmp
:>/var/run/utmp
:>/var/run/wtmp
# regenerate module dependencies and ls.so.cache
echo -n "Updating modules.dep..."
depmod -a 2>/dev/null
echo "	Done."
echo -n "Updating texhash..."
mktexlsr
echo "	Done."
echo -n "Updating mandb..."
mandb -c
man doesnotexist >/dev/null 2>&1
echo "	Done."
#echo -n "Updating menus..."
#/usr/sbin/mkmenusfromkde
#echo "	Done."
echo -n "Updating locate-database..."
updatedb --prunepaths="/KNOPPIX.build /mnt/hd /mnt/cdrom /tmp /usr/tmp /var/tmp"
update-dlocatedb
echo "	Done."

echo -n "Fixing permissions in /dev/..."
chown root.root /dev/ttyp*
chmod 666 /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*
echo "  Done".

echo -n "Fixing permissions in /etc/ppp/..."
chown root.dip /etc/ppp/*secrets /etc/ppp/ppp_* /etc/ppp/peers/*provider /etc/ppp/peers /etc/ppp /etc/chatscripts /etc/chatscripts/*
chmod g+rwX    /etc/ppp/*secrets /etc/ppp/ppp_* /etc/ppp/peers/*provider /etc/ppp/peers /etc/ppp /etc/chatscripts /etc/chatscripts/* 
echo "  Done".

echo -n "Removing unused architecture Kernel sources: "
for i in `ls -1 /usr/src/linux*/arch/ | egrep -v '(i386|x86_64)'`; do
	echo -n "$i "; rm -rf /usr/src/linux*/arch/"$i" /usr/src/linux*/include/asm-"$i"
done
echo "	Done."

# Remove obsolete bluetooth module
rm -f /lib/modules/*/kernel/drivers/usb/bluetooth.o

echo -n "Creating auto.mnt..."
cat >/etc/auto.mnt <<EOT
# Knoppix automounter file for Directory /mnt/auto
# umask=000 only works for msdos/vfat floppies, but otherwise the floppy is read-only.
floppy	-fstype=auto,user,exec,umask=000	:/dev/fd0
cdrom	-fstype=auto,user,exec,ro	:/dev/cdrom
# The following entries (if any) are auto-generated by knoppix-autoconfig
EOT
echo "  Done".
# echo "Setting OpenOffice Link to default EN"
# rm -f /etc/alternatives/soffice.resource ; ln -sf /opt/openoffice/program/resource-en /etc/alternatives/soffice.resource
# rm -f /etc/alternatives/soffice.help ; ln -sf /opt/openoffice/help/help-en /etc/alternatives/soffice.help
echo -n "Zeoring available Package lists ..."
for i in $(find /var/lib/apt/lists -type f \( -name \*Packages -o -name \*Sources \) 2>/dev/null); do  :>"$i"; done
dpkg --clear-avail
rm -f /var/cache/apt/*.bin
apt-cache gencaches

echo "Done."
#!/bin/sh
# Remove unwanted init scripts and KDE-autostart files

STOP=""
for i in `ls -d1 /etc/rc?.d/* | egrep -v -e '(README|knoppix|xsession)'`; do
BASE=`basename $i`
BASE=${BASE##[KS]??}
case "$STOP" in *${BASE}*) ;; *) STOP="$STOP $BASE"; ;; esac
rm -vf $i
done

#for i in $STOP; do
# /etc/init.d/$i stop
#done

# use my own (insecure) device settings for a single user system
chmod 666 /dev/ttyS* /dev/ttyUSB* /dev/ttyACM* /dev/rfcomm* /dev/ircomm*

for i in `ls -d1 /usr/share/autostart/* | egrep -v -e '(panel|kdesktop|khotkeys|knoppix)\.desktop'`; do
rm -vf $i
done

# Remove broken japanese fonts in Debian
find /usr/X11R6/lib/X11/fonts -iname \*ja.\* -exec rm -fv {} \;

# Fix permissions
chmod u+s,go+rx /usr/bin/cdrecord* /usr/bin/cdrdao /usr/bin/nvtv
# /usr/bin/cdparanoia

# Remove erraneous -lXinerama_pic from kdelibs4-dev libraries
# perl -pi -e 's/-lXinerama_pic//g' `dpkg -L kdelibs4-dev | grep '\.la'`

# Some GTK programs HAVE to run as root. :-/

for i in `egrep -l -r -e '(xcdroast|ethereal|kbackup)' /usr/share/applications/. /usr/share/applnk/. /var/lib/menu-xdg/applications/menu-xdg/.`; do
	perl -pi -e 's|Exec=/|Exec=sudo /|g' "$i"
done

# Replace kdesu (needs password) by sudo (doesn't)
for i in `grep -l -r 'Exec=.*kdesu' /usr/share/applications/. /usr/share/applnk/. /var/lib/menu-xdg/applications/menu-xdg/.`; do
	perl -pi -e 's|Exec=.*kdesu |Exec=sudo -H |g' "$i"
done

# Replace su-to-root (needs password) by sudo (doesn't)
for i in `grep -l -r 'Exec=.*su-to-root' /usr/share/applications/. /usr/share/applnk/. /var/lib/menu-xdg/applications/menu-xdg/.`; do
	perl -pi -e 's|Exec=.*su-to-root.*-c |Exec=sudo -H |g' "$i"
done

# Remove -ncp in xboard startup file
for i in `grep -l -r 'Exec=.*xboard.*-ncp' /usr/share/applications/. /usr/share/applnk/. /var/lib/menu-xdg/applications/menu-xdg/.`; do
	perl -pi -e 's| -ncp||g' "$i"
done

# Refresh menu look&feel
# ( cd /KNOPPIX.build/update-menus-kde 2>/dev/null && ./update-menus-knoppix )

# Almost everything is wrong in this menu file
rm -f /usr/lib/menu/evolution1.3

# Add KDE link to Gnome
#[ -e /var/lib/gnome/KDE ] || cp -aul /usr/share/applnk /var/lib/gnome/KDE
# Add KNOPPIX menu link to Gnome
#[ -e /var/lib/gnome/KNOPPIX ] || cp -aul /usr/share/applnk/Knoppix /var/lib/gnome/KNOPPIX
# Remove obsolete Knoppix links in /usr/share/gnome/apps
rm -rf /usr/share/gnome/apps/Knoppix

# Change Debians OpenOffice settings to default font Helmet
#for i in `find /usr/lib/openoffice -name Writer.xml`; do
# for j in Standard Heading List Caption Index; do
#  perl -pi -e 's|<'"$j"' cfg:type="string" xsi:null="true"/>|<'"$j"' cfg:type="string">Helmet</'"$j"'>|g' $i
# done
#done

for i in "alias net-pf-17 af_packet" "alias ide_cs ide-cs" "alias usbcore off" "alias autofs autofs4"; do
grep -q "$i" /etc/modutils/aliases || { echo "$i" >> /etc/modutils/aliases; update-modules; }
done

# Make acrobat the default PDF viewer, if present.
for i in `find /usr/share/applnk -iname Acrobat_Reader.desktop`; do
egrep 'MimeType=application/pdf' "$i" >/dev/null ||
echo "InitialPreference=4
MimeType=application/pdf;Application" >> "$i"
done

# Change desktop icon for Mozilla
for i in /usr/share/applnk/*/*/Mozilla_Browser.desktop; do
	perl -pi -e 's|Icon=.*$|Icon=mozilla|g' "$i"
done

#for i in "vendor 0x055d product 0x9001 module pwc"; do
#grep -q "$i" /etc/usbmgr/usbmgr.conf || echo "$i" >> /etc/usbmgr/usbmgr.conf
#done

#TTFFONTS="/usr/share/fonts/ttf/western /usr/share/fonts/ttf/decoratives /usr/share/fonts/truetype/openoffice /usr/share/fonts/truetype/ttf-bitstream-vera /usr/X11R6/lib/X11/fonts/defoma/TrueType /usr/share/fonts/latex-ttf-fonts"
#XFONTS="/usr/X11R6/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/75dpi /usr/X11R6/lib/X11/fonts/100dpi /usr/X11R6/lib/X11/fonts/Speedo /usr/X11R6/lib/X11/fonts/PEX /usr/X11R6/lib/X11/fonts/cyrillic /usr/X11R6/lib/X11/fonts/latin2/75dpi /usr/X11R6/lib/X11/fonts/latin2/100dpi /usr/X11R6/lib/X11/fonts/Type1"

# Euro font stuff
#perl -pi -e 's/iso8859-1( |$)/iso8859-15$1/g' /etc/X11/fonts/*/*.alias

#for i in $TTFFONTS; do
#[ -d "$i" ] && ( cd $i ; rm -f fonts.cache-1 fonts.scale; mkttfdir )
#done

#for i in $XFONTS; do
#[ -d "$i" ] && ( cd $i ; rm -f fonts.cache-1; mkfontdir; mkfontscale )
#done

HOME=/root fc-cache -f -v
# install -m 644 /root/.fonts.cache-1 /usr/share/knoppix/profile/.fonts.cache-1

# LaTeX
#mkfontdesc

# Copy fontcache, if present
# [ -f /home/knoppix/.fonts.cache-1 ] && \cp -afv /home/knoppix/.fonts.cache-1 /usr/share/knoppix/profile/

# Linux User Filesystem module for captive ntfs
[ -x /usr/share/lufs/prepmod ] && { echo "Regenerating lufs module for captive NTFS"; /usr/share/lufs/prepmod; }

# && update-fonts-alias /usr/X11R6/lib/X11/fonts/misc
echo "In case you updated nessus >= 2.0, please run nessusd once, to create the /usr/lib/nessus/plugins/.desc directory."

grep -q LSGT /etc/X11/xkb/symbols/be || perl -pi -e 's/("Belgian";)/$1\n\n    key <LSGT>	{ [ less, greater, backslash, backslash ] };/g' /etc/X11/xkb/symbols/be

# Prelink
echo "Recreating library cache..."
ldconfig
# prelink --ld-library-path=/opt/openoffice/program -m /opt/openoffice/program >/dev/null 2>&1
# prelink --ld-library-path=/usr/lib/mozilla -m /usr/lib/mozilla >/dev/null 2>&1
# Undo prelinking for some special cases
# prelink -u /usr/lib/libgnutls.*so.*.* 2>&1

# prelink --ld-library-path=/usr/lib/mozilla -m /usr/lib/libgkgfx* /usr/lib/libgtkembedmoz* /usr/lib/libjsj* /usr/lib/libmsgbaseutil* /usr/lib/libxpcom* /usr/lib/libxpistub* >/dev/null 2>&1
# prelink -a -m >/dev/null 2>&1
echo "Done."
#!/bin/bash

DEST="$1"
CDRECORD=/KNOPPIX.build/cdrecord
MKISOFS=/KNOPPIX.build/mkisofs
BOOTSRC=/KNOPPIX.build/Knoppix.System/bootdisk/Knoppix3.4

for i in hda hdb hdc hdd; do echo "using_dma:1" >/proc/ide/$i/settings; done

[ -z "$DEST" -o ! -d "$DEST" ] && { echo "Usage: $0 DESTINATIONDIR" >&2 ; exit 1; }
[ ! -x /KNOPPIX.build/create_compressed_fs ] && { echo "Need /KNOPPIX.build/create_compressed_fs." ; exit 1; }


# FORMAT: Main.Patchlevel YYYY-MM-DD (or Special_Release_String)
KNOPPIX_VER="$(</etc/knoppix-version)"
VERSION="${KNOPPIX_VER% *}"  # must be exactly 3 chars!!!
RELEASE="${KNOPPIX_VER##* }" # must be exactly 10 chars!!!

echo -n "Update KNOPPIX version ($KNOPPIX_VER) in file $DEST/KNOPPIX/knoppix-version and /etc/knoppix-version [N/y]? "
read answer
if [ "$answer" = "y" ]; then
read -p "[$KNOPPIX_VER] " ver
[ -n "$ver" ] && for i in /etc "$DEST/KNOPPIX"; do echo "$ver" > $i/knoppix-version; done
fi

# Compression blocksize (must be multiple of 512)
# All block headers must fit into a kmalloc segment (ca. 130000 bytes)
# BLOCKSIZE=73728
BLOCKSIZE=65536
# BLOCKSIZE=53248
# BLOCKSIZE=102400

echo -n "Update Boot file(s) [N/y]? "
read answer
if [ "$answer" = "y" ]; then
( cd $BOOTSRC/.. && ./mkinitrd.sh $BOOTSRC )
cp -uv "$BOOTSRC"/linux{24,26} "$BOOTSRC"/minirt{24,26}.gz "$DEST"/boot/isolinux/ || exit 1
cp -v "$BOOTSRC"/isolinux-de.cfg "$DEST"/boot/isolinux/isolinux.cfg || exit 1
cp -v "$BOOTSRC"/logo-de.16 "$DEST"/boot/isolinux/logo.16 || exit 1
cp -v "$BOOTSRC"/f2-de "$DEST"/boot/isolinux/f2 || exit 1
cp -v "$BOOTSRC"/f3-de "$DEST"/boot/isolinux/f3 || exit 1
cp -v "$BOOTSRC"/boot-de.msg "$DEST"/boot/isolinux/boot.msg || exit 1
fi

echo -n "Recreate KNOPPIX compressed FS [N/y]? "
read answer
if [ "$answer" = "y" ]
then
rm -f "$DEST"/KNOPPIX/KNOPPIX

# Remove files that need to be autogenerated from source dir!
echo -n "Sweep/Clean system before remastering [N/y]? "
read answer
[ "$answer" = "y" ] && { apt-get update; . /KNOPPIX.build/Knoppix.postupgrade; . /KNOPPIX.build/Knoppix.clean; }

cat >/etc/network/interfaces <<EOT
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

EOT

cat >/etc/dhcpc/resolv.conf <<EOT
# Insert nameservers here
# nameserver 127.0.0.1
EOT

# Mount root read-only, so no files change while generating image
mount -o ro,remount / || { echo "Error: Cannot mount / read-only" >&2 ; exit 0; }

# Hide unwanted LOCALEs.
HIDELOCALE=""
HIDEMAN=""
MYLOCALE=$(awk -F'[="_]' '/^(LANG|LANGUAGE)=/{if(!/[$]/){x=x" "$3}}END{print x}' /etc/init.d/knoppix-autoconfig)
MYLOCALE="$MYLOCALE C en ja be da dk zh"
LOCALEDIR=/usr/share/locale
MANPAGEDIR=/usr/share/man
for LOCALE in `/bin/ls -1 $LOCALEDIR`; do
[ -d "$LOCALEDIR/$LOCALE/LC_MESSAGES" ] || continue
	FOUND=""
	for l in $MYLOCALE; do
		case "$LOCALE" in $l*) FOUND="yes" ;; esac
	done
	if [ -z "$FOUND" ]; then
		HIDELOCALE="$HIDELOCALE -m $LOCALEDIR/$LOCALE"
		[ -d "$MANPAGEDIR/$LOCALE" ] && HIDELOCALE="$HIDELOCALE -m $MANPAGEDIR/$LOCALE"
	fi
done

# -U implies: -d, -l, -L, -N, -relaxed-filenames,  -allow-lowercase,
# -allow-multidot  and  -no-iso-translate
#	-iso-level 3 -U -cache-inodes -no-bak -pad \
#	-hide-rr-moved \
#	-m /var/lib/dpkg/available\* \
SORT=""
[ -e /KNOPPIX.build/mkisofs.sort ] && SORT="-sort /KNOPPIX.build/mkisofs.sort"
# mkisofs -pad -R -l -v $SORT \
$MKISOFS -input-charset ISO-8859-15 -R -U $SORT \
	-no-split-symlink-components -no-split-symlink-fields \
	-V "KNOPPIX_FS" \
	-P "KNOPPER.NET" \
	-p "www.knopper.net" \
	-hide-rr-moved -cache-inodes -no-bak -pad \
	-m /Makefile\* \
	-m /proc/\* -m /sys/\* -m /tmp/\* -m /var/tmp/\* -m /home/\* -m /initrd/\* \
	-m /KNOPPIX.build -m /mnt/\*/\* -m \*.dpkg-\* \
	-m /mnt/hd/\* -m /mnt/hd\* -m /mnt/cdrom\* -m /etc/fstab\* \
	-m /etc/exports -m /etc/dhcpc/dhcpcd\* \
	-m /var/spool/mail/\* -m /var/spool/mqueue/\* \
	-m /etc/driveprm -m .ssh -m .bash_history \
	-m /etc/printcap\* -m /var/spool/cups/tmp/\* \
	-m /etc/cups/certs/\* -m /etc/cups/\*.O -m /etc/cups/ppd/\* \
	-m /etc/gpm.conf -m /etc/isapnp.\* -m /etc/minirc.dfl \
	-m /var/cache/debconf/\*-old -m /var/lib/\*/\*- \
	-m /var/lib/\*/\*old -m /var/log/XFree86.\* \
	-m /var/samba/\*.pid -m /var/lib/samba/\* -m /var/cache/samba/\* \
	-m /var/mail/\* -m /var/apt/cache/archives/lock \
	-m /var/log/ksymoops\* -m /var/spool/exim/db/\* -m /etc/\*.old \
	-m /etc/\*.save -m /etc/ssl/certs/\* -m \*.preserved \
	-m .viminfo -m .\*.swp -m lost+found \
	-m /.\?\?\* -m /root/.\?\?\* -m /etc/.\?\?\* \
        -m /boot/map -m /boot/boot.0\* \
        -m /usr/src/modules/\* \
        -m /usr/src/linux\*/arch \
        -m /usr/src/linux\*/drivers \
	-m /usr/src/linux\*/fs \
	-m /usr/src/linux\*/init \
	-m /usr/src/linux\*/mm \
	-m /usr/src/linux\*/net \
	-m /usr/src/linux\*/vmlinu\* \
	-m /usr/src/linux\*/System.map \
	-m /usr/src/linux\*/ipc \
	-m /usr/src/linux\*/stamp-\* \
	-m /usr/src/linux\*/C\* \
	-m /usr/src/linux\*/M\* \
	-m /usr/src/linux\*/R\* \
	-m /usr/src/linux\*/debian \
	-m /usr/src/linux\*/kernel \
	-m /usr/src/linux\*/kdb \
	-m /usr/src/linux\*/lib \
	-m /usr/src/linux\*/crypto \
	-m /usr/src/linux\*/scripts \
	-m /usr/src/linux\*/conf.vars \
	-m /usr/src/linux\*/.*depend \
	-m /usr/src/linux\*/.*old \
	-m /usr/src/linux-2.6\* \
        -m /usr/src/kernel-packages\* \
	$HIDELOCALE / \
	| /KNOPPIX.build/create_compressed_fs - $BLOCKSIZE >"$DEST"/KNOPPIX/KNOPPIX || exit 1
#        -m /usr/src/kernel\*.deb -m /usr/src/kernel\*.dsc -m /usr/src/kernel\*.changes -m /usr/src/kernel\*.tar.gz \
#	-o "$DEST"-tmp.iso / && \
#	/usr/bin/compressloop -v -v -c 9 -b $BLOCKSIZE "$DEST"-tmp.iso "$DEST"/KNOPPIX/KNOPPIX && rm -f "$DEST"-tmp.iso || exit 1
mount -o rw,remount /
chmod 444 "$DEST"/KNOPPIX/KNOPPIX
# Clean up
find /var/lib/apt/lists/ -type f -exec rm -f {} \;
# swapoff /dev/hdc2 2>/dev/null
fi

mkfinal(){
TARGET="$1.iso"
# Alternate boot record
#	-eltorito-alt-boot \
#	-b KNOPPIX/boot-en.img -c KNOPPIX/boot.cat \
echo -n "Checksumming..."
( cd "$DEST" ; rm -f KNOPPIX/md5sums; find . -type f -not \( -name \*md5sums\* -o -name \*.cat -o -name boot-\*.img \) | sed 's|^\./||' | sort | while read name; do md5sum -b "$name"; done > KNOPPIX/md5sums )
echo "Done."
# Make sure that the boot images AND the boot catalog are at the beginning of the image.
# Some controllers seem to depend on this.
rm -f /tmp/knoppix.sort
echo "$DEST/boot/isolinux/* 111111"      >/tmp/knoppix.sort
echo "$DEST/ct/* -10000"               >>/tmp/knoppix.sort
echo "$DEST/LinuxTag/* -10000"         >>/tmp/knoppix.sort
echo "$DEST/LinuxTag/Song/* -10000"    >>/tmp/knoppix.sort
echo "$DEST/Demos/Audio/*.mp3 -10000"  >>/tmp/knoppix.sort
echo "$DEST/Demos/Audio/*.ogg -10000"  >>/tmp/knoppix.sort
$MKISOFS -input-charset ISO-8859-15 -pad -l -r -J \
	-sort /tmp/knoppix.sort \
        -V 'KNOPPIX' -A 'KNOPPIX LIVE LINUX CD' \
        -P "KNOPPER.NET" \
        -p "www.knopper.net" \
        -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
        -hide-rr-moved \
        -o "$TARGET" "$DEST"
}

echo -n "Recreate KNOPPIX-DE isofile '$DEST.iso'? "
read answer
if [ "$answer" = "y" ]; then
# Make final CD Image
mkfinal "$DEST"

echo -n "Recreate KNOPPIX-EN isofile '$DEST-EN.iso'? "
read answer
if [ "$answer" = "y" ]; then
rm -f "$DEST"/KNOPPIX/boot/isolinux/{isolinux.cfg,boot.msg,f2,f3}
cp -v "$BOOTSRC"/isolinux-en.cfg "$DEST"/boot/isolinux/isolinux.cfg || exit 1
cp -v "$BOOTSRC"/logo-en.16 "$DEST"/boot/isolinux/logo.16 || exit 1
cp -v "$BOOTSRC"/f2-en "$DEST"/boot/isolinux/f2 || exit 1
cp -v "$BOOTSRC"/f3-en "$DEST"/boot/isolinux/f3 || exit 1
cp -v "$BOOTSRC"/boot-en.msg "$DEST"/boot/isolinux/boot.msg || exit 1
mkfinal "$DEST-EN"
rm -f "$DEST"/KNOPPIX/boot/isolinux/{isolinux.cfg,f2,f3}
cp -v "$BOOTSRC"/isolinux-de.cfg "$DEST"/boot/isolinux/isolinux.cfg || exit 1
cp -v "$BOOTSRC"/logo-de.16 "$DEST"/boot/isolinux/logo.16 || exit 1
cp -v "$BOOTSRC"/f2-de "$DEST"/boot/isolinux/f2 || exit 1
cp -v "$BOOTSRC"/f3-de "$DEST"/boot/isolinux/f3 || exit 1
cp -v "$BOOTSRC"/boot-de.msg "$DEST"/boot/isolinux/boot.msg || exit 1
fi

rm -f /tmp/knoppix.sort
fi

echo -n "BURN german CD version? "
read answer
if [ "$answer" = "y" ]; then
{ $CDRECORD dev=0,1,0 -atip 2>/dev/null | grep -qi "is erasable"; } && BLANK="blank=fast"
$CDRECORD -v -dao -pad -eject gracetime=0 driveropts=burnfree -overburn dev=0,1,0 speed=12 fs=24M $BLANK "$DEST.iso"
fi


Reply to: