From CCLUG

Main: Knoppix Tricks

Knoppix is a nice compressed Linux distro that runs live from one CD; and does not have to be installed on the hard drive, although you can if you want to. It's Debian based. The tips on this page work with Knoppix 3.2. For more information, check out the docs and search the forums at: http://knoppix.net/forum/

Custom boot floppy

To make a boot floppy from the Knoppix CD, in Windows or DOS, open the Knoppix folder on the CD and run mkfloppy.bat. Then follow the instructions. In Linux, cd to the Knoppix folder on the CD and run this command:

dd if=boot.img of=/dev/fd0 bs=1440k

I don't have much hard drive space on my windows laptop, so I leave the knoppix CD in and boot it from floppy when I want to use knoppix. I wanted my cheat codes in the floppy so they would auto load. I use myconfig=scan home=scan noeject screen=800x600. The noeject keeps the CD tray from popping out when I shut down knoppix. So, I edited the Syslinux.cfg file on the boot floppy in a windows text editor and added my cheat codes to the default entry as so:

 DEFAULT vmlinuz
 APPEND myconfig=scan home=scan noeject screen=800x600 and so on
 TIMEOUT 50

I changed the timeout to 50 from 300 so there would only be a 5 second delay before knoppix boots. The custom floppy works great.

Custom boot CD

I wanted to make a custom CD that used the same cheat codes as the custom floppy so I could use Smart Boot Loader from the MBR to boot Windows or the custom CD with no boot floppy. That way, I could boot first from the hard drive selecting Windows or the custom Knoppix CD and leave a floppy in to back up small files onto every day.

A bootable CD uses an image of a boot floppy to boot. This is Knoppix/boot.img on the CD. In Linux, I made a boot.img file from my custom boot floppy and put it in folder /tmp4 with this command:

dd if=/dev/fd0 of=/tmp4/boot.img bs=1440k

Then to make a custom Knoppix iso, I copied the contents of the Knoppix CD into a folder /tmp4/knx. Then I moved boot.img out and put my custom boot.img in. Then I used this command to make the custom iso:

mkisofs -pad -l -r -J -v -V "KNOPPIX" -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -hide-rr-moved -o /tmp4/knoppix.iso /tmp4/knx/

The command comes from the remastering howto at: http://www.knoppix.net/docs/index.php/KnoppixRemasteringHowto

Then I burned a 700mb cd-rw from the iso for testing, since I wasn't sure it was going to work. The cd-rw gave occasional i/o errors on the laptop; but it worked well on a desktop PC. So, I burned a fast cd-r from the iso; and it works great.

If you want to do this in Windows, Winimage and Winiso will let the user extract boot.img from the Knoppix iso, edit the files, and put it back; but the trial versions would not let me do the last step. I did edit the Syslinux.cfg file in a Windows text editor and added my cheat codes to the default entry as on the boot floppy. To keep the file size the same, you can remove some of the extra pound signs at the end of the file until the size is the same as when you started. Then I remade the boot.img with Winimage.

Windows/Knoppix CD dual boot

Smart Boot Manager is a small, powerful, free boot manager that can run from a floppy or the MBR and boot hard drive partitions and CD or floppy drives. I wanted to use SBM from the MBR to boot Windows or the custom CD with no boot floppy. That way, I could boot first from the hard drive selecting Windows or the custom Knoppix CD an drive (if you set the BIOS to boot the CD drive before the hard drive). Enter cheat codes at the boot prompt to customize the setup, such as: knoppix screen=800x600. Hit F2 at the boot prompt to see a list of codes. More complete lists are available at knoppix.net. If you want to save custom settings, go to kmenu, knopppix, configure, and save knoppix configuration. You can also make a persistent home if you want to save files. Just make a persistent home of the size you want. Be patient, it can take a while. When the question about encryption comes up, it's done.

Copy to hard drive

You can copy the Knoppix folder from the CD onto a hard drive partition of around 700mb and run knoppix from there as if it were on a CD. This is a nice way to run Knoppix -- faster, quieter, and it frees up the CD drive. I made a fat32 partition on a second hard drive, put it on there, boot it with Lilo, and it works great. The following procedure is adapted from this post: http://www.knoppix.net/forum/viewtopic.php?t=1075#4399

To copy the Knoppix CD to a vfat hard disk partition and then boot Knoppix from there using Lilo:

 If the partition is drive C for example:
 copy the cdrom folder KNOPPIX to C:/ 
 Now C:/KNOPPIX is your cdrom 
 copy 2 files from your Knoppix boot floppy - vmlinuz and miniroot.gz - to 
 for example: C:/knxboot 

then add to your installed linux /etc/lilo.conf the following paragraph

 image=/mnt/hda1/knxboot/vmlinuz 
 label=Knoppix
 read-only 
 initrd=/mnt/hda1/knxboot/miniroot.gz 
 append="lang=us ramdisk_size=100000 and so on like on the floppy"

You can add your custom cheat codes to the append, then in a console terminal run: /sbin/lilo Then reboot, and there will be a new line in your lilo boot menu: Knoppix

Install on hard drive

You can use the Knoppix CD to do a normal Debian Linux install of about 2.2gigs on the hard drive. I did it, but it's different from the CD version and I didn't like it as compared to RH 9. If you want to try it, follow the proceedure here: http://www.freenet.org.nz/misc/knoppix-install.html

This is a condensed version: To get Knoppix installed onto your hard drive: Boot the Knoppix CD. When the boot prompt comes up, choose your language. Most of us speak English, so we'll type: knoppix lang=us Then press ENTER. Wait till the system is fully launched, including the KDE desktop, then press CTRL-ALT-F1, to get a root console. You should see a shell prompt. Type: knx-hdinstall Then follow the guided installation menus.

Resize persistent home

I used KDE to resize my Knoppix 3.2 persistent home. Here's the process: Copy your personal files from the knoppix home to a folder on a hard drive mounted read/write. Reboot Knoppix without mounting your Knoppix home (no home=scan entry). Unmount the hard drive you will use for the persistent home. Go to kmenu, knoppix, configure, and make a persistent home of the new size you want. Knoppix will make a new sized home over your old home. Be patient, it can take a while. When the question about encryption comes up, it's done. Reboot with mounting of the Knoppix home; and the new space should be there. Go to kmenu, system, info center, storage devices to check the size and free space.

Winmodem

The forums at knoppix.net have information on getting winmodems working. This is from a post. After setting up the driver files as described in the post, I put a shortcut in my autostart folder to run a script that activates my Lucent winmodem at startup. Then when I want to get on the internet, I click on a desktop KPPP icon that connects and launches Mozilla. The script is in this post: http://www.knoppix.net/forum/viewtopic.php?t=2050#9512

I use a custom autostart folder so that Konqueror doesn't launch every time I start Knoppix: Right click on the desktop, click configure desktop, then paths, to make the change. I use: /home/knoppix/autostart. Then move showindex.desktop out and put the modem shortcut in.

Mouse pointer

I use the Flat White Mouse with Shadow X11 Mouse Theme from http://kde-look.org/. It looks good and is easy to see on my laptop screen. To get the mouse pointer to change on the desktop as well, you may need to move your KNOPPIX.desktop file off the desktop to another folder so Knoppix will make a fresh one on reboot.

Style/Theme

To get the Mac OS X look in Knoppix, I installed the acqua theme/style for KDE 3. It also works fine in KDE 3.1. You have to follow all the steps in the readme file and configure Icewm for acqua. Use the default_blue.jpg for the desktop wallpaper rather than the one in the acqua package. The resultant gui looks really nice. Here's the link: http://www.kde-look.org/content/show.php?content=153 . It looks even better with the Icosx Icons. Here's the link: http://www.kde-look.org/content/show.php?content=2242

Fix MBR

If your master boot record is broken, and you want to repair it with Knoppix, read the readme file in /knoppix/user/share/docs/mbr. It tells how to make an mbr boot floppy that I have used to boot win98se. You do it as root from a terminal. The command, after su to become root, is like these command examples:

install-mbr /dev/fd0 -T /dev/hda

Install the default MBR image on /dev/fd0, taking the partition table from /dev/hda.

install-mbr -kr /dev/hda

Reset the parameters on /dev/hda without installing any new code.

Rescue CD

IBM has an article on how to use Knoppix as a rescue CD:

http://www-106.ibm.com/developerworks/linux/library/l-knopx.html?ca=dgr-lnxw12KnoppixRecovery

LS-120 drive

In KDE, in Knoppix 3.2, for an internal LS-120 drive, right click on the desktop, select create new, floppy device. Name it LS-120, and set the device to /dev/sda, then click ok. This should give you a desktop icon for the LS-120. Put a floppy in the drive, click the icon, and it should display the files in Konqueror after a few moments. Knoppix recognizes these drives as scsi devices. To remove the floppy, right click on the icon and select unmount. -JD

Retrieved from http://www.cclug.org/wiki/Main/KnoppixTricks
Page last modified on November 08, 2005, at 01:18 pm