User:Ml
(Work in progress)
i worked on a customized knoppix cd, based on knoppix 4.0.2.
I'm posting my changes here in case they might be of use to others.
Contents
grub gfx boot
i wanted the cd to boot using grub instead of isolinux (can be used for repairs/diagnostics). morphix and kanotix are both using a cute graphic grub menu, which gives easy access to various knoppix cheatcodes, documentation etc. This one's based on morphix, with slight ui changes (added dvorak keyboard layout, kept only french and english languages, updated doc and menus)
screenshot http://matthieu.lucotte.free.fr/myknoppix/grub_gfx_sml.png
grub files need to be setup under boot/grub on the knoppix cd.
note: remember to make final iso image with :
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 knoppix_iso_directory
boot/grub/message is a cpio archive which controls the ui. to recreate it you need the tools from gfxboot_2.4.orig.tar.gz.
Then you can use gfxboot-grub-0.1_my.tgz to recreate message (based on morphix-iso-grubtheme_0.1-2.tar.gz)
dev setup
i wanted an easy way to test the remastered version from hd without having to reboot or create an iso each time, so i had another machine boot from the network just like knoppix terminal server, except with the current state of my remastered version.
i got tired of having 2 different miniroots (one for the cd, one for netboot) so i merged the 2 together (of course, the actual netboot miniroot still needs the right network modules added to it to work, but that's the only difference)
Also, knoppix terminal server still required a KNOPPIX cloop file, which i didn't want to create each time, so i added a "nocloop" cheatcode to use the raw files instead.
There are issues when using nfs + unionfs directly (which normally don't occur in knoppix terminal server since it's nfs + cloop + unionfs - note: "nfsro" unionfs mount option seems to fix it, but shouldn't be needed), so i ended up putting the remastered files in an ext2 filesystem in a loop file (knoppix_loop) and accessing that from the diskless client.
note: the netboot client still uses pxelinux - grub network support sucks
miniroot changes
i also wanted a way to boot from an iso image on the hd, without needing the physical cd at all (i have a notebook without cd drive, hence "bootfrom" cheatcode wouldn't work there). so i added a "fromiso" cheatcode, and direct support for reiserfs, ntfs and ext3 (i don't mind having a bigger miniroot)
lastly i merged changes from accelerated knoppix, see next section for that.
download new miniroot: miniroot.gz
warning: /home lives in unionfs in my version, not in ramdisk as in knoppix 4.0.2 (/home/knoppix already exists in the cloop image)
new cheatcodes documentation
* Alternative boot methods (ie not booting from cd). Useful for testing while remastering knoppix. knoppix nbdhost=10.0.0.1 mount filesystem on network block device nbdport=1234 (nbd) served by specified host. knoppix nfsdir=10.0.0.1:/knoppix mount nfs directory (*) nodhcp don't ask for ip (diskless clients) (*) knoppix fromiso=/dir/file.iso boot from iso directly. doesn't need cd as bootfrom cheatcode. knoppix nocloop don't mount a KNOPPIX cloop image. other cheatcodes determine directory to use as /KNOPPIX knoppix loopfile=/dir/image mount filesystem on specified file (implies nocloop) (*) : same cheatcodes as available on knoppix-terminal-server clients. Examples ======== Boot from knoppix iso on hd: (the whole cd iso, not the KNOPPIX cloop file - compare with just fromhd=...) knoppix fromhd=/dev/hda4 fromiso=/share/isos/knoppix_402.iso Boot from ext2 filesystem in loop file /knoppix_loop on hd partition /dev/hda4: knoppix fromhd=/dev/hda4 loopfile=/knoppix_loop Boot from nfs on 10.0.0.101 serving content of knoppix cd (same as knoppix terminal server): knoppix nfsdir=10.0.0.101:/mnt/tmp nodhcp Boot from nbd on 10.0.0.101 port 1234 serving same /knoppix_loop fileas above: knoppix nocloop nbdhost=10.0.0.101 nbdport=1234 nodhcp Filesystems =========== The cd's initrd image supports the following filesystems iso9660 reiserfs ext3 ext2 ntfs vfat (original one only supports iso9660 ext2 vfat, so can't use fromhd on ntfs for example. bootfrom has to be used instead, but requires the cd...)
accelerated knoppix
The guys at http://www.alpha.co.jp/ac-knoppix/ have optimized the knoppix cd layout and boot process so it boots in under 50 seconds on some pcs. the cd layout optimization is done with a profiler, and it's possible to use it to speed up apps as well.
the main documentation is in japanese, so here's what i figured on the optimization procedure from google automatic translation ( manual and a tutorial ).
Downloads: get lcat_1.0.tar.bz2 from http://sourceforge.jp/projects/lcat/
note: knoppix-terminal-server changes:
- build miniroot from /cdrom/boot/miniroot.gz (or prompt user) instead of
- building from scratch (so we reuse whatever cloop module is in there)
new cheatcodes documentation
* Accelerated Knoppix knoppix chkblk=10000 enable cloop profiling. profile data is available in /proc/cloop/ knoppix nocbr don't use cloop readahead knoppix noac45 don't use 45xession fixes knoppix noacka don't use knoppix-autoconfig fixes knoppix noacxs don't use xsession fixes knoppix noacit don't use inittab fixes knoppix noac don't use any boot script/progs fixes
qemu
installed qemu 0.7.2 with kqemu accelerator
installed qemu gui: qemu launcher
additional scripts needed for networking :
- /etc/qemu-ifup (edit to choose between bridge or forward setup)
- /usr/local/bin/qemu_bridge : bridge virtual and ethernet interfaces
- /usr/local/bin/qemu_forward : use iptables to forward traffic to virtual interface
- /usr/local/bin/qemu_prelaunch : qemu_launcher prelaunch script
misc
added "xkeyboards" cheatcode to enable overriding of additional keyboard layouts (useful in addition to "keyboard" and "xkeyboard" cheatcodes if you want complete control over which layout are there)
notes
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.d
eb
fixed /usr/share/hwdata/pcitable to use via xfree driver
home on unionfs
in most scripts, replaced
CMDLINE="$(cat /proc/cmdline)"
with
CMDLINE=" $(cat /proc/cmdline) "
to prevent bugs with keywords at the beginning/end when a leading/trailing space delimiter is looked for.
various scripts changes (fstype etc)
/etc/init.d/knoppix-autoconfig new orig diff
/etc/X11/Xsession.d/45xsession new orig diff