------------------------------------------------------------------------------------------------ REMASTER NOTES General idea: http://www.knoppix.net/wiki/Knoppix_Remastering_Howto ------------------------------------------------------------------------------------------------ CLEANUP / CHECKS BEFORE MAKING ISO review and run apps to get init files initialized, update /home/knoppix will save ram ! make sure we have fixes for known bugs http://www.knoppix.net/wiki/Bugs/4.0.2CD cleanup: rm /etc/mtab resolv.conf mails /tmp /.rr_moved /root/.Xauthority /root/.bash_history apt-get clean /var rm /var/tmp/kdecache-knoppix del /etc/X11/XF86Config-4 check /etc/rc*.d : should be only knoppix stuff here unionfs bug for non root writeable directories (see Unionfs_bug) find . -type d -a -user root -a ! -perm -200 | xargs chmod u+w make sure ~root/remaster/all_changes is up to date update databases, (run stuff in /etc/cron.daily) locate dlocate whatis apropos ... ldconfig miniroot checks: compare modules % knoppix/lib/modules /dev/shm exists and /dev/shm entry in miniroot's etc/fstab ------------------------------------------------------------------------------------------------ TO TEST captive + auto /etc/fstab setup test new rebuildfstab check wifi ------------------------------------------------------------------------------------------------ CLEANUP TODO ******* apps that could be removed ******** remove some gcc/g++ versions remove scribus ? put back kview (for konqueror) or remove kviewshell do we really need that many editors ? both kate and kwrite ? ------------------------------------------------------------------------------------------------ CLEANUP DONE apt-get remove mozilla-firefox-locale-de mozilla-firefox-locale-de-de mozilla-thunderbird-locale-de dpkg-reconfigure locales apt-get install localepurge apt-get remove kde-i18n-de kde-i18n-es kde-i18n-it kde-i18n-ja kde-i18n-nl kde-i18n-pl kde-i18n-ru kde-i18n-tr -> 187M freed so far apt-get remove kstars kstars-data apt-get remove netris frozen-bubble xbattle xskat ksokoban ace-of-penguins kreversi katomic gtans kbattleship xgalaga imaze kmahjongg kasteroids ktuberling xboing apt-get remove chromium chromium-data frozen-bubble-data apt-get remove fb-music-low libkdegames1 kteatime apt-get remove nessus nessusd mysql-server mysql-common nessus-plugins libnasl2 libnessus2 apt-get remove elinks lynx apt-get remove enigma enigma-data apt-get remove manpages-de apt-get remove gcj-3.3 libgcj-common libgcj4 libgcj4-common libgcj4-dev apt-get remove xtel lesstif1 apt-get remove libdbi-perl libkdeedu1 libopenal0 libgd-gif1 libzipios++0c102 liblualib50 libglpng apt-get remove liba52-0.7.4 libdc1394-13 libdvbpsi4 libdvdnav4 libdvdread3 libflac7 libgsm1 libmpeg2-4 libtar libwxgtk2.6-0 libxosd2 apt-get remove kaffeine apt-get remove acroread apt-get remove kolourpaint kpilot kvdr apt-get remove kview kuickshow apt-get remove gmessage libmal1 vdr apt-get remove kdepim-kfile-plugins libpisock8 pilot-link apt-get remove kandy gpsdrive apt-get remove efax efax-gtk kfax apt-get remove libtiff-tools libsigc++-2.0-0 libpaper-utils apt-get remove liblua50 apt-get remove mc apt-get remove nedit joe brltty apt-get remove gnuchess xboard apt-get remove freenx libnxcomp0 libnxcompext0 nxagent nxclient nxdesktop nxlibs nxproxy nxsetup-knoppix nxssh nxtunnel-client nxtunnel-server nxviewer apt-get remove expect apt-get remove trans-de-en ding completely purge removed packages: COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' >topurge dpkg -P `cat topurge` ******* orphans ********* For some reason deborphan -a doesn't show all packages that are not depended on (for instance kstars) using get_orphan instead. cycles of: get_orphans cat orphans |cut -d\| -f2 > tmp edit tmp apt-get remove --purge `cat tmp` ******* static libs ********* - remove static libs in *-dev packages: dpkg -l | grep '^ii' | cut -d\ -f3 | grep -e '-dev$' > devs cat devs | while read f; do dpkg -L $f ; done | tee devs_files cat devs_files | while read f ; do if ! [ -L "$f" ]; then echo $f ; fi ; done > devs_files_nolinks cat devs_files_nolinks | grep '\.a$' > static_libs !! beware don't remove /usr/lib/libc_nonshared.a libpthread_nonshared !! -> rm static_libs: 58Mb freed - stats on what's in dev packages: cat devs_files_nolinks | xargs wc -c > devs_files_sizes cat devs_files_sizes | grep -v '^ 0 ' > devs_files_sizes_clean cat devs_files_sizes_clean | sort -k 2 > devs_files_sizes_clean_sorted cat devs_files_sizes_clean_sorted | cut -b 10- | cut -d/ -f1-4 | sed -e 's|^/usr/lib/.*|/usr/lib/|' | sed -e 's|^/usr/include/.*|/usr/include/|' | sed -e 's|^/usr/bin/.*|/usr/bin/|' | sort -u > devs_dirs cat devs_dirs | while read f ; do printf "%-40s" "$f" ; cat devs_files_sizes_clean_sorted | grep " $f" | cut -b 0-9 | (g=0; while read h; do g=$[$g+$h]; done ; echo $g) ; done > devs_dirs_sizes cat devs_dirs_sizes | sort -k 2 -n rm /usr/local/lib/*.a ******** big dev package docs ********* cd /usr/share/doc du -sk * | sort -n | grep lib changelogs: cd /usr/share/doc && find . -iname "*changelog*.gz" -printf "%s\n" | (f=0; while read g; do f=$[$f+$g]; done ; echo $f ) cd /usr/share/doc && find . -iname "*news*.gz" rm -rf /usr/share/gtk-doc/html/* ******* after mkisofs ******** removed linux-ntfs stuff in cdrom/KNOPPIX/ ------------------------------------------------------------------------------------------------ REMASTER Once done working in the chroot environment: umount /proc nice -5 mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" -hide-rr-moved -cache-inodes -pad /mnt/knoppix | nice -5 /mnt/crap/src/remaster/compressloop/compressloop64n -c 9 - /mnt/space/samba/share/isos/KNOPPIX (difference between compression level best and default: about 3Mb) in cdrom directory: find -type f -not -name md5sums -not -name boot.cat -not -name iso9660_stage1_5 -exec md5sum '{}' \; > KNOPPIX/md5sums update wallpaper on cdrom iso etc (overrides cloop one) put notes, dpkg -l update miniroot cfg etc make final iso: mkisofs -pad -l -f -r -J -V "MYKNOPPIX" -b boot/grub/iso9660_stage1_5 -c boot/grub/boot.cat -o ../myknoppix.iso -no-emul-boot -boot-load-size 1 -boot-info-table `pwd` Note: cmd for isolinux was (original knoppix): mkisofs -pad -l -r -J -v -V "MYKNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o `pwd`/../knoppix_new.iso `pwd` accelerated knoppix (optimize KNOPPIX cloop image) follow steps in /cdrom/KNOPPIX/remaster/accelerated_knoppix/README ----- other older stuff (not used) ----- http://www.knoppix.net/forum/viewtopic.php?t=13867 remaster scripts: http://debian.tu-bs.de/knoppix/remaster/ ------------------------------------------------------------------------------------------------ TODO really low prio firefox: try extensions: easy gestures, single window, bug me not, close tab on double click check what's wrong with etherboot in knoppix-terminal-server loadlin setup like goblinx qemu: investigate qemu hand written code generator https://nowt.dyndns.org/ x48 hp48 apps play with squashfs win qemu on cd + setup to load from windows w/o rebooting investigate sending syslog output to console (debug cheatcode should do that at least ?) cheatcode for setting QT_XFT=1 in 45xsession ? ------------------------------------------------------------------------------------------------ TODO low prio - way to get ppp user/password from windows ? speedup: check out accelerated knoppix !! remove rsyncs from /etc/init.d/45xsession enlightenment + conf wifi win driver qsynaptics other emulators (uae) demos tunelling / vpn tools ? softs: abiword amule gtkpod dia (no need if keep scribus) hevea ------------------------------------------------------------------------------------------------ TODO - sound: use alsa ! alsa cheatcode doesn't seem to work - mplayer can't seem to read vcds - fix 500 mount perm when using fromhd and ntfs (can't even fix with remount afterwards ?!) - eciadsl (usb hifocus and globespan based modems - ~63 modems supported) http://eciadsl.flashtux.org/ - speedtouch modem (needs firmware) - no audio CD player - verify CD: very little time to see the result prompt user at the end (continue/reboot) - kernel cmdline > 256 characters miniroot: - use new miniroot.gz (fixed fromiso bug: was using cdrom.boot instead of cdrom.loop mountpoint) - fix things with fromhd, loopfile, fromiso etc so that : - mtab is up to date - we don't use losetup /dev/loopX, mount line is confusing there's gotta be a way to make mount -o loop,ro working ... (right now, getting "Coult not find a spare loop device" maybe non static mount works ?) - hd partitions are mounted where they should be, ie /mnt/hdXX instead of /cdrom.loop, /cdrom and the like ... update firefox adblock filters w32grub -> so we can install grub on ntfs (and read) partition http://grub4dos.sourceforge.net/ (newer) other stuff http://www.skyjammer.com/files/knoppix/ http://www.geocities.com/lode_leroy/grubinstall/ - also would be nice if gfxgrub supported ntfs ... chntpw visual keyboard (xvkbd ? but misses russian ...) knoppix-cheatcodes.txt: add doc for xkeyboards cheatcode : enable overriding of additional keyboard layouts (useful in addition to "keyboard" and "xkeyboard" cheatcodes if you want complete control over which layout are there) fix qemu_run_iso: pass extra args, fix always prompt for file /boot/grub/menu_x.lst -> entry for fluxbox uses icewm actually add larswm entry /boot/grub/menu_d.lst -> verify cd: add nocbr (faster) optimize all the apps !! ------------------------------------------------------------------------------------------------ DONE put fix for miniroot's /accel/knoppix-autoconfig (pfi -> fi @ end) -------------------- snapshot7: grub: customized morphix grub boot gfxboot: http://www.morphix.org/debian/source/ morphix-iso-grubtheme_0.1-2.tar.gz grub-gfxboot_0.95-1.tar.gz - added dvorak keyboard layout - updated menus, doc etc fixed kde file associations knoppix accelerated changes: dpkg -i lcat_1.0.0-1_i386.deb new miniroot, merged knoppix accelerated changes, added sg module noac cheatcode to turn off knoppix accelerated changes to boot scripts/progs knoppix-terminal-server: build miniroot from /cdrom/boot/miniroot.gz (or prompt user) instead of building from scratch (so we reuse whatever cloop module is in there) boot tools: smart boot manager stuff to make a grub floppy cleanup kde menu apt-get install tightvncserver disable etherboot support in knoppix-terminal-server (etherboot roms can handle pxe, and knoppix etherboot stuff is broken) use new miniroot in knoppix-terminal-server apt-get install alsamixergui apt-get install ripperx (cd ripper) fixed reiserfs detection bug (fstype script) sshfs cgoban, gnugo, cgoban2 + menu entry xmame-x installed esound frontend to select games: cxmame wrapper: xmame_run -> start esound, use Xv if available etc menu entries: link to rom site and rom directory put remaster tools on cd get_orphans compressloop64 put subtitle tool (fixsub ?) editor (subtimer, jubler, subtitleeditor) made debian packages for compiled stuff so we don't break dependencies: lame xvidcore libdvdcss mplayer acidrip captive-ntfs impose+ mpage cthumb tetex-extra msttcorefonts added xkeyboards cheatcode to allow control over additional xkb layouts lyx -> apt-get install lyx-xforms (see bottom for log details) apt-get install latex-xft-fonts (200k) hacked lyx-qt's dependencies removed lyx-xforms and libforms1 updated user conf, /etc/profile etc iptables + qos scripts in /root/conf zssh x48 + rom dvdrip: acidrip : + menu shortcuts apt-get install libgtk2-perl (6.8M) apt-get install libdvdread3-dev (for lsdvd, 400k) same miniroot for cd and term server with linuxrc supporting (+ combinations) - nbd - fromiso - nfsdir - nocloop - loopfile w3m small stuff: bchunk unrar beep busybox-static smbget sux tcptraceroute checkmp3 mp3check mp3splt mp3wrap p7zip iftop gqview kpdf qemu qemu launcher (perl gnome) apt-get install libgtk2-gladexml-perl apt-get install libgnome2-perl fix qemu-launcher: default prelaunch -> sudo qemu_prelaunch tunscript -> /etc/qemu-ifup /etc/qemu-ifup calls qemu_forward or qemu_bridge qemu_run_iso: run iso directly qemu_run: cmdline wrapper qemu accelerator (kernel module) didn't work: kqemu-0.7.2.tar.gz needs qemu 0.8.0 -> can't boot goblinx iso with it (hangs taking no cpu) qemu-0.7.0 doesn't work with kqemu-0.7.2 (error -1) debian tutorial, but with 0.7.2 sources http://genibel.org/blog/index.php/2005/11/08/45-utiliser-qemu-avec-l-acceleration-kqemu - switch to testing - apt-get source qemu - copy that to orig/ and new/ - in new/: rm -rf qemu-0.7.0 - get v0.7.2 from website, tar -xvzf qemu-0.7.2.tar.gz - in new/qemu-0.7.2: tar -xvzf ../../kqemu-0.7.2.tar.gz - cp -pdrv ../../orig/qemu-0.7.0/debian . - rm -f debian/patches/* # some don't apply cleanly - debchange -v '0.7.2' - debuild binary - check /lib/modules/ , might have created wrong kernel dir. move kqemu.ko if so. - dpkg -i ../qemu_0.7.2_i386.deb - add to fstab (and mkdir /dev/shm if not present) tmpfs /dev/shm tmpfs defaults 0 0 benchmark on via samuel 600MHz 512M ram, booting GoblinXMini-1.2.2.iso: without kqemu: 16min with kqemu: 10min 23s firefox: extensions: tab mix + settings flashblock adblock plus image zoom flashplugin-nonfree settings: small cache, no session saving etc install extensions in /usr/lib/mozilla-firefox (try -install-global-extension file.xpi as root) -> didn't work so installed as user (won't take memory now that /home/knoppix is on unionfs instead of /ramdisk) xine test win32 codecs setup test dvd setup menu shortcuts custom desktop picture: path: /usr/local/lib/knoppix.jpg X11 splash screen (400x265 png) path: /usr/share/apps/ksplash/Themes/Default/splash_top.png edit /etc/apt/sources.list, keep only debian unstable ! dma on by default (add to boot cmdline) unionfs-1.1.3 not really needed. installed initially to test nfsro mount option, but looks evil... /home lives in /ramdisk on original knoppix. put it on unionfs to save ram. (seems like remnant from before unionfs days...) had to change: - miniroot's /linuxrc - /etc/X11/Xsession.d/45xsession: selectively copies stuff from /etc/skel /usr/share/knoppix/profile /usr/share/knoppix/profile/var/tmp/kdecache-knoppix (if it exists) to /home/knoppix. network block device: nbd-client nbd-server via xorg/xfree drivers extracted via_drv.o for xfree 4.3.0 from http://www.physik.fu-berlin.de/~glaweh/debian/unichrome/xserver-xfree86_4.3.0.dfsg.1-10.1unichrome30.1_i386.deb fixed /usr/share/hwdata/pcitable to use via xfree driver compiled libs: libdvdcss etc lame xvidcore mplayer 1.0pre7try2 with gui (gmplayer) codecs, subtitle font, skin captive + auto /etc/fstab setup win files -> fuse: 2.5.2 module + libs libs: apt-get fuse-utils libfuse-dev module: build from source, cp kernel/fuse.ko /lib/module/2.6.12/kernel/fs/fuse/ -> apt-get readline-dev, ntfsprogs-dev, libgnomevfs2-dev -> captive-install ui: apt-get libreadline5-dev libntfs-dev libgnomevfs2-dev libgnomeui-dev glade-2 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-shared --disable-static --with-readline --disable-bug-replay --enable-install-pkg --enable-sandbox-setuid=captive --enable-sandbox-setgid=captive --enable-sandbox-chroot=/var/lib/captive --enable-man-pages --enable-sbin-mountdir=/sbin --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd --disable-gtk-doc --with-orbit-line=link strip installed progs: make install-strip change /usr/sbin/rebuildfstab to use captive-ntfs by default for ntfs ------------------------------------------------------------------------------------------------ NOTES to make new miniroot (BEWARE! change 7000 to whatever the size actually is!!): mke2fs -L "KNOPPIX Miniroot" -b 1024 -N 8192 -O none -F -q -m 0 miniroot 7000 dvorak: boot with keyboard=dvorak xkeyboard=dvorak nox: boot with: knoppix 2 run Xnest: Xnest -geometry 1024x768 :1 kernel patch if need to recompile kernel (waring, lots of extra and misc modules to rebuild as well...) Change the #define COMMAND_LINE_SIZE 256 line to #define COMMAND_LINE_SIZE 512 in the following files: /usr/src/linux/include/asm-i386/param.h /usr/src/linux/include/asm-i386/setup.h ------------------------------------------------------------------------------------------------ LOGS apt-get install libreadline5-dev libntfs-dev libgnomevfs2-dev fuse-utils libfuse-dev Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: gconf2 gconf2-common gnome-mime-data libavahi-client-dev libavahi-common-dev libavahi-compat-howl-dev libavahi-compat-howl0 libbonobo2-0 libbonobo2-common libbonobo2-dev libdbus-1-dev libdbus-glib-1-2 libfuse2 libgconf2-4 libgconf2-dev libglib2.0-0 libglib2.0-data libglib2.0-dev libgnomevfs2-0 libgnomevfs2-common libgnutls11 libgnutls11-dev libhal-storage1 libidl-dev libntfs8 libopencdk8-dev liborbit2 liborbit2-dev libreadline4 libreadline5 libxml2-dev makedev ntfsprogs readline-common shared-mime-info testdisk Suggested packages: libglib2.0-doc libgnomevfs2-bin gnutls-bin libgnutls-doc Recommended packages: fuse-source zenity libgnomevfs2-extra gamin fam orbit2 The following packages will be REMOVED: libntfs5 The following NEW packages will be installed: gconf2 gconf2-common gnome-mime-data libavahi-client-dev libavahi-common-dev libavahi-compat-howl-dev libavahi-compat-howl0 libbonobo2-0 libbonobo2-common libbonobo2-dev libdbus-1-dev libdbus-glib-1-2 libgconf2-4 libgconf2-dev libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-dev libgnutls11-dev libhal-storage1 libidl-dev libntfs-dev libntfs8 libopencdk8-dev liborbit2 liborbit2-dev libreadline5-dev libxml2-dev readline-common shared-mime-info The following packages will be upgraded: fuse-utils libfuse-dev libfuse2 libglib2.0-0 libglib2.0-data libglib2.0-dev libgnutls11 libreadline4 libreadline5 makedev ntfsprogs testdisk 12 upgraded, 29 newly installed, 1 to remove and 805 not upgraded. Need to get 12.2MB of archives. After unpacking 36.0MB of additional disk space will be used. root@not a tty[knoppix_build]# apt-get install libgnomeui-dev glade-2 Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: glade glade-common gnome-keyring libart-2.0-dev libatk1.0-0 libatk1.0-dev libbonoboui2-0 libbonoboui2-common libbonoboui2-dev libcairo2 libcairo2-dev libglade2-0 libglade2-dev libgnome-keyring-dev libgnome-keyring0 libgnome2-0 libgnome2-common libgnome2-dev libgnomecanvas2-0 libgnomecanvas2-common libgnomecanvas2-dev libgnomeui-0 libgnomeui-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgtk2.0-dev libpango1.0-0 libpango1.0-common libpango1.0-dev libxfixes-dev libxfixes3 libxinerama-dev libxinerama1 libxrender-dev libxrender1 xlibs-static-dev xlibs-static-pic Suggested packages: glade-doc libglade0-dev glade-doc-2 libcairo2-doc desktop-base libgnome2-doc libgnomecanvas2-doc gnome-icon-theme libgnomeui-doc libgtk2.0-doc ttf-kochi-gothic ttf-kochi-mincho ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp libpango1.0-doc xspecs Recommended packages: automake1.4 libgail17 libatk1.0-data The following NEW packages will be installed: glade glade-2 glade-common gnome-keyring libart-2.0-dev libatk1.0-dev libbonoboui2-0 libbonoboui2-common libbonoboui2-dev libcairo2 libcairo2-dev libglade2-0 libglade2-dev libgnome-keyring-dev libgnome-keyring0 libgnome2-0 libgnome2-common libgnome2-dev libgnomecanvas2-0 libgnomecanvas2-common libgnomecanvas2-dev libgnomeui-0 libgnomeui-common libgnomeui-dev libgtk2.0-dev libpango1.0-dev libxfixes-dev libxfixes3 libxinerama-dev The following packages will be upgraded: libatk1.0-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libpango1.0-0 libpango1.0-common libxinerama1 libxrender-dev libxrender1 xlibs-static-dev xlibs-static-pic 11 upgraded, 29 newly installed, 0 to remove and 803 not upgraded. Need to get 16.8MB of archives. After unpacking 32.1MB of additional disk space will be used. apt-get install lyx-xforms Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libforms1 libkpathsea4 libpoppler0c2 libxaw8 lyx-common tetex-base tetex-bin tex-common Suggested packages: ispell aspell sgmltools-lite linuxdoc-tools tex4ht hevea tth latex2html gnuhtml2latex wv gs-gpl texinfo dvipng chktex lacheck rubber sam2p Recommended packages: tetex-extra libtiff-tools tetex-doc perl-tk libxml-parser-perl The following NEW packages will be installed: libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libforms1 libkpathsea4 libpoppler0c2 libxaw8 lyx-common lyx-xforms tetex-base tetex-bin tex-common 0 upgraded, 11 newly installed, 0 to remove and 787 not upgraded. Need to get 33.4MB of archives. After unpacking 115MB of additional disk space will be used. apt-get install xmame-x Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libxxf86dga1 libxxf86vm1 xmame-common Suggested packages: xmame-tools The following NEW packages will be installed: libxxf86dga1 libxxf86vm1 xmame-common xmame-x 0 upgraded, 4 newly installed, 0 to remove and 787 not upgraded. Need to get 9669kB/10.1MB of archives. After unpacking 38.0MB of additional disk space will be used.