============================= Using the Knoppix Linux CDROM ============================= -Ian! D. Allen idallen@idallen.ca The Knoppix CDROM comes from: http://www.knopper.net/knoppix/ http://www.knopper.net/knoppix/index-en.html The CD version used is 5.1: KNOPPIX_V5.1.1CD-2007-01-04-EN Knoppix Bug: - if you switch desktops, you lose the bar on the bottom of the screen - left click on the desktop and select "Configure Desktop" - select "Multiple Desktops" - drag the slider down to one single desktop - click "Apply" - Knoppix 5.1.1 available: http://knopper.net/knoppix/index-en.html The Knoppix version of Linux is based on the Debian Linux distribution, and it runs entirely in memory, without using any part of your hard disk. You can use Linux commands to mount Windows or Unix partitions from your hard disk; but, these mounts are not done by default. Everything you do in the Knoppix file system is lost when you shut down Knoppix. The file system is an in-memory file system that disappears when the system shuts down. Nothing in a Knoppix file is saved. You must copy your work from Knoppix to another machine before shutting down Knoppix. Getting a CDROM --------------- Download the Knoppix 5.1 ISO file KNOPPIX_V5.1.1CD-2007-01-04-EN.iso from www.knopper.net or get it locally on the Algonquin College network from this directory: http://10.50.254.148/distributions/Knoppix/KNOPPIX_V5.1.0CD-2006-12-30-EN/ http://10.50.254.148/distributions/Knoppix/KNOPPIX_V5.1.1CD-2007-01-04-EN/ Bring the Knoppix 5.1 CD to all your Lab sessions. If you can't download it, ask your instructor for a disk to borrow and copy. Protecting your CD from surface damage; testing the CDROM image --------------------------------------------------------------- The Knoppix CD is very full and is thus subject to surface damage. Keep your CD in a proper CD case. If you carry the CD in a paper envelope or loose in your backpack, it will get scratched and stop working just when you need it most. To test the data on your CD, enter this at the Knoppix "boot:" prompt: boot: knoppix-txt testcd This means run a text-mode boot with a CD checksum test. The "testcd" option will verify that your CDROM is fully readable, at least on the CDR reader you are using. (Different CDROM readers have different characteristics; a CD that works on one may not work on another.) Knoppix Boot options -------------------- At the Knoppix "boot:" prompt you have a large selection of boot options. Pushing F2 or F3 will list some of them. The full list is named "knoppix cheatcodes" and Google will find a copy for you. Some more help is here: http://www.knoppix.net/wiki/Cheat_Codes and a copy is available on the Algonquin network under this directory: http://10.50.254.148/distributions/Knoppix/KNOPPIX_V5.1.0CD-2006-12-30-EN/ http://10.50.254.148/distributions/Knoppix/KNOPPIX_V5.1.1CD-2007-01-04-EN/ as well as in the left sidebar on the Course Home Page. Booting in the Lab and at Home ------------------------------ Insert the Knoppix CDROM and reset or reboot your computer. (At home, you may need to adjust your BIOS so that your computer boots from a CDROM before the internal disk drive.) The Knoppix CD drive should light up. When you see the "boot:" message, you may press RETURN to speed up the boot process; otherwise, it will time out and continue on its own after a half minute or so. A useful option is to type "knoppix-txt" at the boot: prompt to see more of the system boot messages. (This can help tell you where the system is hanging on boot.) Pay attention to the boot messages! Reboot if you see any CDROM errors (e.g. I/O error, or CRC error). If the errors persist, get a new Knoppix CDROM and try again. If the errors persist, label this computer as having a bad CDROM, tell your instructor about the computer with the bad CDROM, and move to a new computer. Do not use a Knoppix system that has shown any CRC or I/O errors during the boot process. The system may appear to work; but, it may crash without warning due to the corrupted CDROM image loaded into memory. Booting from CDROM at Algonquin College --------------------------------------- Algonquin ITS has disabled all public computers on campus so that they cannot boot from the CDROM or Floppy disk. ITS computers only run Microsoft Windows. Algonquin College only supports Microsoft Windows. You will not be able to boot your Knoppix CDROM in any of the ITS public access labs. (From Windows you may use PuTTY to login remotely to other Linux servers.) Testing or Resetting Knoppix Internet Access -------------------------------------------- After Knoppix is up and running, start a shell window and check the status of your Ethernet cards: $ /sbin/ifconfig If your machine has correctly obtained a DHCP network address, you should see a dotted-quad IP address beside the "inet addr" keyword in the output for at least one of your Ethernet cards (e.g. eth0): inet addr:192.168.3.150 Bcast:192.168.3.255 Mask:255.255.255.0 The address you are given depends on what network you are on. If you see no "inet addr" on any cards, your machine has not been able to get an IP address and network access will not work. Find out why. If you changed a network cable and need Knoppix to re-detect the network, try these commands (as root): # /etc/init.d/networking restart # network-setup # netcardconfig Algonquin ITS has blocked all network testing protocols such as "ping" and "traceroute". You will not be able to use these tools to verify that your system is able to access remote Internet sites. As a work-around, try using the netcat "nc" or "telnet" commands to connect to HTTP port 80 on a well-known site (e.g. Google): $ telnet google.ca 80 Trying 216.239.39.104... Connected to google.ca (216.239.39.104). Escape character is '^]'. ^] telnet> quit Connection closed. You might also try the "wget" command to fetch a web page: $ wget 'http://google.ca/' Connecting to google.ca[216.239.39.104]:80... connected. [...] 03:59:33 (69.05 MB/s) - `index.html' saved [2,317] If neither of these commands works to any web sites, you probably don't have Internet access. Try the network reset commands given above. Shutting down KNOPPIX --------------------- To gracefully end your Knoppix Linux session and eject the CDROM, either use the GUI "logout" button or become the root Super User and type "shutdown -h now" at a root shell prompt. WARNING: You *must* do a graceful shutdown if you have mounted any real disk partitions; otherwise, you will lose data and possibly corrupt data on your hard disk. Technically, if you haven't mounted any real disk partitons, since nothing from Knoppix is saved, you can just hit the RESET button to reboot your computer; but, don't get into the habit of doing this with a Unix system that has a real hard disk or that has a hard disk mounted! If Knoppix refuses to surrender the CDROM and open the CDROM tray, push the reset button and try the CDROM button before Knoppix reboots. Virtual Consoles ---------------- You can access four text-only Linux virtual consoles from the GUI by using a special key sequence: CTRL-ALT-F1 or CTRL-ALT-F2 or CTRL-ALT-F3 or CTRL-ALT-F4 From the text-only virtual consoles, you can switch consoles using just the ALT-F1 keys (do not use CTRL as well). ALT-F5 returns you to the Knoppix GUI and the X11 windows system, where you need to use the CTRL-ALT modifiers to return to the text consoles again. The virtual consoles in Knoppix are all logged in as the system administrator "root". Accounts under KNOPPIX ---------------------- The GUI interface to Knoppix comes up logged in as userid "knoppix" (no password). The text virtual consoles are all logged in as the root account, also with no password. Do not enable remote connections to your computer until you assign passwords to these accounts (using the passwd command). Knoppix has remote connections disabled by default. If you run commands on the root console or as the super-user "root", be aware that you can execute commands to re-format or otherwise damage information on hard disks attached to your computer. Don't play around as "root". If a Knoppix service asks you for the root or super-user password, remember that you have to set it first (using the passwd command). Nothing is saved! ----------------- Remember that *NOTHING IS SAVED* when you shut down Knoppix. The Knoppix file system is RAM-based; it disappears when you power off. If you do important work directly on the Knoppix in-memory file system, you must copy your work from Knoppix to another computer before you shut down. Access to attached disk drives ------------------------------ The partitions of your existing hard disk are not mounted or available by default when Knoppix boots. If you use the GUI interface running as user "knoppix", you cannot do anything to alter or damage your existing hard disk if you leave your existing disk partitions unmounted. (Only the super-user can access disk partitions.) If you want to have write access to disks detected by Knoppix, you need to unmount the disks, turn off "read-only", and re-mount them. A Better Browser ---------------- Knoppix starts up with the KDE Konqueror Web browser open. Unfortunately, it calls an external program (KWrite) just to see text web pages! I recommend closing Konqueror and using the FireFox/IcwWeasel browser instead. FireFox/IceWeasel is available under the browser icon in the task bar at the bottom of the screen. Avoid the default Konqueror browser; it doesn't handle some web pages well. Using SSH to/from Knoppix ------------------------- To use SSH to connect from Knoppix to a remote machine: $ ssh userid@host.ca To copy a file foo from Knoppix to a file bar on a remote machine: $ scp foo userid@host.ca:bar To enable Knoppix to receive incoming SSH connections, you must first put passwords on the "root" and "knoppix" accounts, or else anyone will be able to break into your machine. Become the root user with "su" and then execute sshstart: $ su # sshstart Nothing you do in Knoppix is saved after you log out. You will have to repeat all of this next time you boot from CDROM. Booting without the window system --------------------------------- You can boot Knoppix quickly to a text console without the X11 GUI Window system using this method: Wait for the Knoppix "boot:" prompt. Pay attention - the prompt only appears for a few seconds before the machine takes over and comes up with the full windowing system. When you see the "boot:" prompt from Knoppix, type this after the boot prompt: knoppix-txt 2 (Remember to press RETURN after each line you enter at a prompt.) The Knoppix system will continue to boot. Again, watch for errors. When you get a "root@tty1" prompt on the console, Knoppix has booted successfully in non-GUI mode. You are logged in as the root super-user. (Be careful!) No window system is running; however, you can use ALT-F2, ALT-F3, etc. to change to alternate text consoles, and you can use SSH and FTP to login to other systems. None of the X11 GUI programs will work in console mode. In console mode, the kernel Knoppix system occupies less than 35MB of memory.