Archive for February, 2008

are taken care of. After you re installed (Photo web hosting) and

Friday, February 29th, 2008

are taken care of. After you re installed and logged into Knoppix using one ofyour accounts, connect to the Internet. Then: 1.Choose System.KPackage (Package Manager). The KPackage package management program opens. 2.In KPackage, choose Special.Apt: Debian.Update. A separate KPackage window appears. 3.When asked for your root password, type it and press Enter. Within the secondary window, you can watch the update process. Onceyou see the text RESULT=#(where # stands for any number), the updateis complete. You ll also see the word Donea bit above it. 4.Click Cancel to close the second window. It takes a minute or so for KPackage to process the new package lists itjust downloaded. 5.In KPackage, choose Special.Apt: Debian.Upgrade. The Update selection just grabbed the latest list of available packages. Choosing Upgrade now grabs all the updated software and installs it. Asecondary window appears, and you can watch what s happening inthere. First, KPackage figures out what software it needs to update. 6.When asked whether you want to continue, type Yand press Enter. Now, KPackage actually grabs the updates to install them. This processcan take a while (an hour or longer) the first time you do it, dependingon how long your version of Knoppix has been available. You can tellhow much longer it has to go by watching the percentage marker in thebottom left of the window. Once the download is complete, KPackagebegins configuring the packages for installation. 7.If you re asked questions about how to configure packages, answerthem as best you can and press Enter after your answer. Unfortunately, this process can feel a bit cryptic. You can always go back and change things if you have to, later. Often a default is offered, so try just pressing Enter if you re not sure what else to do. After you veanswered all the questions, the updating begins. The longer your down- load took, the longer your update will take, so again be prepared to wait. You also may be asked more configuration questions along the way, somake sure to at least glance at the screen from time to time. The secondary window closes on its own once the update is complete. You can now close KPackage. 387Chapter 21: Ten CoolUses for Knoppix29_

11.Type the password again and press Enter. The (Web server address)

Thursday, February 28th, 2008

11.Type the password again and press Enter. The Creating Knoppix Configuration Step (5/7) screen appears. 12.Type your root (Administrator s) password, press Enter, and thenrepeat as you did before with the login account s password. After the second time, the Creating Knoppix Configuration Step (6/7) screen appears. 13.Type the name to assign to this computer and press Enter. The Creating Knoppix Configuration Step (7/7) screen appears. 14.Accept the settings in this screen (unless you re positive that you wantto change them) and press Enter. The Knoppix Main-Menu screen returns. Keep in mind that following thisstep sets you up to only have Knoppix as a boot option. 15.Use your up and down arrows to select Start Installation and press Enter. The Starting Knoppix Installation screen appears. Review the informa- tion shown. 16.If something is wrong, use the Tab key to select No and press Enterand then return to Step 5 to make changes. Otherwise, use the Tabkey to select Yes and press Enter. The installation begins. When it finishes, the Creating Floppy Disk screenappears. 17.If you want to create a boot floppy disk (which can be handy if some- thing happens to your boot menu), use Tab to select Yes. Otherwise, use Tab to select No. Press Enter. I assume that you re not creating a boot disk with these instructions. Ifyou choose to do so, Knoppix will walk you through the process. Whenyou either finish making the boot disk or skip it, the InstallationSuccessful screen appears. 18.Press Enter to close the installation program. 19.Type rebootto reboot the machine. You re told when it s safe to eject the DVD-ROM or CD-ROM. From there, you ll be booting into Knoppix, or at least into its boot menu! Keeping Knoppix Up to DateIf you decided to install Knoppix, as discussed in the previous section, thenyou need to keep it up to date so that all security vulnerabilities and bug fixes386Part V:The Part of Tens

Once you re ready to proceed, place the (Web hosting colocation) DVD

Thursday, February 28th, 2008

Once you re ready to proceed, place the DVD that came with this book (or aKnoppix CD-ROM) into your DVD-ROM or CD-ROM drive and reboot the ma- chine. If you re using the DVD that came with this book, press Enter at the bootprompt. If you don t see a boot prompt, see Appendix B. After you re fully in your Knoppix desktop, complete the following steps. If you re using a newer version of Knoppix than the one that comes with thisbook, the instructions for the latest version are available online athttp://www.freenet.org.nz/misc/knoppix-install.html. 1.Press the key combination Ctrl-Alt-F1 to exit the GUI and enter command-line mode. You can use F1 through F6 to do this from any version of Linux. Cool, huh? To get back, simply press Ctrl-Alt-F7 or Ctrl-Alt-F8. Whether it s 7 or 8varies from version to version, so try 7 and if that doesn t work, use 8.2.If you see a bunch of colorful text but no prompt (which will look likeroot@tty1[/]#), press Enter to pull up the prompt. 3.Type /KNOPPIX/usr/sbin/knx2hdThe screen turns blue and the Initialisation of Knoppix-Installation screenappears. (Initialisation is the UK spelling of the American and CanadianInitialization.) 4.Press Enter. The Knoppix Main-Menu screen appears. 5.Use your up and down arrows to select Configure Installation andpress Enter. The Choose System Type screen appears. 6.Use your up and down arrows to select Beginner and press Enter. The Creating Knoppix Configuration Step (1/7) screen appears. 7.Use your up and down arrows to select the partition you want toinstall Knoppix in, press the space bar to mark that partition, andthen press Enter. The Creating Knoppix Configuration Step (2/7) screen appears. 8.Type your full name in the format Firstname Lastname and press Enter. The Creating Knoppix Configuration Step (3/7) screen appears. 9.If you don t want to use the suggested login name, change it here andthen press Enter. The Creating Knoppix Configuration Step (4/7) screen appears. 10.Type this login account s password and press Enter. The text box goes blank, but the screen doesn t otherwise change. 385Chapter 21: Ten CoolUses for Knoppix29_

For example, home=/dev/sda1. Whenever you (Web hosting isp) put the Knoppix

Wednesday, February 27th, 2008

For example, home=/dev/sda1. Whenever you put the Knoppix CD intothis machine and boot it, you type that information at the boot promptin the format knoppix home=/dev/sda1. This command tells Knoppixto go look and find your home directory. 9.While you re at it, from the main menu, choose KNOPPIX.Configure. Save KNOPPIX Configuration. Now you can configure things to your preferences and have it be persis- tent. A dialog box appears. 10.Stick with the defaults for the types of configuration files and just click OK. Another query dialog box opens. 11.Choose your new home location for saving and click OK. Make note of the information in the final dialog box. Now you would type, at the boot prompt, knoppix home=/dev/sda1 myconfig=/dev/sda1. Installing KnoppixWhile Knoppix is primarily a LiveCD, you can actually install this distribution. If you decide to do so, you may want to first see Chapter 2 for how to make anychanges you might need to make on your machine before beginning the instal- lation. For example, you may want to have already created the partition youwant to put Knoppix in. Fortunately, you can use Knoppix to make the parti- tion! (Again, see Chapter 2.) You can also, instead of starting with Step 5 inthe upcoming steps, choose the Partition menu option to do your partition- ing during the installation and then, when the partitioning is done, return toStep 5. Another caveat is that Knoppix doesn t have a friendly way to set up your bootmenu for dual booting. One (long) way around this is to install Fedora or oneof the other versions of Linux included on the DVD-ROM first and then look inthe file /boot/grub/menu.lst. You find an entry that looks something like thefollowing: title Windows XProot (hd0,0) makeactivechainloader +1Copy this section down. After you ve installed Knoppix, you can then go editits /boot/grub/menu.lst file to add the four lines you found in the other distri- bution to it and reboot. This actions adds a boot menu entry for Windows. (It s important that you don t just copy the hd0,0 part from here, unless yourWindows installation is really on the first hard drive, in its first partition.) 384Part V:The Part of Tens

25.Save and exit the file. 26.Type (Anonymous web server) passwdand press

Tuesday, February 26th, 2008

25.Save and exit the file. 26.Type passwdand press Enter. You re prompted for a new root password. Functioning as a Portable DesktopYou can carry your Knoppix CD and a USB device that contains your homedirectory s contents, to always have your preferred desktop on hand no matterwhere you go. Or, if you re not allowed to replace your current OS (or yourhost s OS) but don t want to have to go through all the stuff in the first sectionof this chapter: 1.From the main menu, choose KNOPPIX.Configure.Create A PersistentKNOPPIX Home Directory. A query dialog box appears. 2.If you want to make a USB device as the home directory, insert it now. Don t proceed until you see the new hard disk partition icon appear onthe desktop. 3.Click Yes in the query dialog box. Another query dialog box appears, asking whether you want to put yourdirectory on one of the listed partitions. 4.Select the partition or USB device you want to save your information on. Another query box appears. 5.If you want to use the whole device (maybe a whole USB keychain), choose Yes. If you want to just use up a bit of someone s existingWindows partition, click No. Don t overwrite your host s or spouse s Windows partition! That wouldtend to annoy them! Another query dialog box appears. It tells you howmuch space on that device is currently used and how much is available. 6.Enter how many MB of space you want to use to store your Knoppixfiles and click OK. Knoppix does what it needs to do and then offers you another dialog box. 7.If you want to encrypt (secure) your data, select Yes. Otherwise, select No. If you choose encryption, you d better not forget your password! I mgoing to assume you chose No. 8.Make a note of where you are told your home directory is and whatyou ll type in the boot prompt. 383Chapter 21: Ten CoolUses for Knoppix29_

Web host - 9.Type cd /mnt/partitionto change to the root partition s

Monday, February 25th, 2008

9.Type cd /mnt/partitionto change to the root partition s base directory. 10.Type cd etcto enter the /etcdirectory, relative to where it sattached to your current setup. 11.Type cp passwd passwd-origto make a backup copy of your mainuser and password file. Don t skip this step. It lets you can revert to the original file if you messsomething up! 12.Type joe passwdto open the /etc/passwdfile in the joe text editor. You can press Ctrl-K and then the H key to display the Help menu at thetop of the screen at any time. To get rid of that menu, press the same keycombination again. 13.Look for the line similar to root:x:0:0:root:/root:/bin/bash14.Delete the x (or anything else) from between the first two colons sothat the line looks more like the following: root::0:0:root:/root:/bin/bash15.Press Ctrl-K and then the X key to save the file and exit the program. 16.When asked for the name of the file to save, just press Enter to acceptthe default. 17.Type rebootto reboot the machine. 18.When the CD-ROM ejects, remove it from the drive and press Enter tocontinue rebooting. 19.After you reboot into your system, log into a regular user account. 20.Open a terminal window. If you re not sure how to do so, see Chapter 14.21.Type su -and press Enter to become the root user. When you deleted that in Step 14, you actually erased any passwordfrom the root user. If you re prompted for a password, just press Enterwithout typing anything. 22.Open the /etc/passwd file in your preferred text editor. 23.Find the line you edited before. It should look something like: root::0:0:root:/root:/bin/bash24.Add the x back into place between the two colons. Remember, this is a lowercase x. It should look like the following now: root:x:0:0:root:/root:/bin/bash382Part V:The Part of Tens

10.Right-click the USB device on your desktop and (Web hosting top)

Monday, February 25th, 2008

10.Right-click the USB device on your desktop and select Unmount. This action makes sure that all your data was saved properly. Recovering a Root Password with KnoppixIf you re using SuSE, Linspire, or another distribution that requires you to entera root password even to enter single user mode, you need external tools tohelp you recover when you forget what your root password is. This problemis another major reason that many system administrators keep Knoppix onhand. To recover your root password, do the following: 1.Place the Knoppix CD or the DVD-ROM that came with this book intoyour CD-ROM or DVD-ROM drive. 2.Reboot the computer. If you re using the DVD-ROM that came with this book, press Enter whenyou reach the boot menu. If, for some reason, the DVD-ROM doesn tboot, see Appendix B. 3.After the computer successfully boots into Knoppix, determine whichpartition refers to your main Linux installation. You re looking for your root (/) partition. Chapter 11 details what youfind there if that helps. Basically, open each of the partition icons onyour desktop and figure out which one looks like the right section ofyour filesystem. 4.After you find the proper partition, if you currently don t have a filebrowser window open anywhere within that partition, click the parti- tion icon to open the browser now. For example, if the root partition is /dev/hda3, click the Hard DiskPartition [hda3]icon. 5.Click the Terminal Program icon on your panel. A terminal window opens. 6.Type su -to access the root user s account. You re not prompted for a password. 7.Make sure to close the file browsing window that s accessing yourroot partition. 8.Type mount -r remount rw /dev/partitionto remove the partitionand re-add it as a full read-write filesystem. For example, if your root partition was on /dev/hda3, you type cd/ mnt/hda3.381Chapter 21: Ten CoolUses for Knoppix29_

To access a USB storage device, (Christian web host) plug it

Sunday, February 24th, 2008

To access a USB storage device, plug it in, and Knoppix automatically adds an icon on your desktop for it! However, there s a caveat here. It mounts allfilesystemsas read-only so that you re going to have to change the USB driveto read-write first: 1.Click the terminal with the black screen icon on your panel. A terminal window appears. 2.Type su -to become the root (administrative) user. You re not prompted for a password. 3.Look at the new icon and see what was put in the brackets. For example, [sda1], which is the typical label for a USB drive. 4.Type mount -o remount,rw /mnt/driveto remount the drive asread-write. So, for example, mount -o remount,rw /mnt/sda15.Find where the files are that you want to copy off of your harddrive(s), using the GUI. If you have lots in lots of places, focus on one group for now and comeback and do another later. 6.Look in the Location bar for the folder the files are in. So, for example, if it says file:/mnt/hda1/web, the folder is /mnt/hda1/web. 7.Use the cdcommand to change to this directory in the command lineterminal. For example, cd /mnt/hda1/web8.Type lsto see the directory s contents. There they are! 9.Use the cpcommand to copy the file(s) you want to copy over. Some hints: To copy all files in this directory and all its subdirectories to/dev/sda1, type cp -r * /dev/sda1 To copy all the files in this directory but no subdirectories, type cp* /dev/sda1 To copy all files whose names begin with an a, type cp a* /dev/ sda1 You may want to bundle and compress the files first. In that case, use the program found in the main menu by choosing Utilities.Arkto do so and tell it to create the archive directly on the USB drive, which shows up on your desktop as Hard Disk Partition [sda1] (which refers to /dev/sda1 and /mnt/sda1). 380Part V:The Part of Tens

Sex offenders web site - Chapter 21Ten Cool Uses for KnoppixIn This Chapter

Saturday, February 23rd, 2008

Chapter 21Ten Cool Uses for KnoppixIn This Chapter Rescuing files off a dead machine Testing, testing! Carrying around a portable Linux desktop Installing KnoppixUntil you walk a mile in another man s moccasins you can t imagine thesmell. Robert ByrneLiveCDs are a great way to experiment with Linux in general, or a particu- lar distribution of Linux, because many of them offer a live version fordownload or purchase. Because Knoppix is recommended as the LiveCD touse for pre-installation tasks in this book, I thought I would make sure to giveyou some more fun things you can do with this CD-ROM so that you don t feellike you wasted your time burning it! I won t even do what my husband sug- gested and make one of the ten entries being to use the disk as a frisbee, because I d hate for you to feel cheated out of something truly cool. Rescuing Files off of a Machine that Won t BootOne cool use for Knoppix is to recover the important files that might be left ona messed up computer that otherwise won t boot. You can use Knoppix for thistask whether those files are in Linux or Windows (even on an NTFS partition!). Then you can either e-mail the files to yourself you can find a simple e-mailprogram in the main menu where you choose Internet.KMail or attach aUSB storage device to the machine and copy the data onto it.

If you re (Photo web hosting) working with a multiboot operating system

Saturday, February 23rd, 2008

If you re working with a multiboot operating system environment, besure that your /etc/grub.conffile contains entries for each of youroperating systems. Each operating system or Linux installation needs to be in separate entries. If your file contains entries to switch to a higher-resolution display andyou have boot problems, try reducing the video setting to simple VGA. Linux allows you to use spaces and other characters in filenames that you mayor may not be able to use in filenames on other operating systems. However, some Linux applications may stumble when they encounter file or directorynames containing spaces. Usually, a safe bet is to stick with alphanumericcharacters and avoid spaces and odd characters, such as question marks and exclamation points. Aaargh! I Forgot My Root Password! What Do I Do? Fear not. You have a way around this problem! You need to boot into singleuser mode, which you can accomplish by rebooting your machine and thendoing the following: Fedora:If you see a blue screen with the words Press any key to enterthe menu, press a key. At the GRUB boot screen, press E, which takesyou to a configuration file. Use the arrow keys to go to the line startingwith kernel, and press Eagain to edit that line. At the end of the line, add the word single, press Enter to put the change into place, and thenpress Bto boot the machine. Knoppix:You don t need to because you can just reboot the machineand start over. Linspire and SuSE:See Chapter 21 for how to use Knoppix to recoveryour root password. Even in single user/failsafe mode, you need the rootpassword for these distributions. Mandrake:Reboot the computer and at the boot menu, select theFailsafe option. Xandros:At the Xandros boot screen, select Configure (Expert). Whenyou reach the Give Root Password For Maintenance prompt, enter yourpassword. No matter what distribution you re using, now s your chance to change theroot password to one you can remember. Type passwdand then enter thenew password twice as directed. When you re done, type exitand then bootthe machine normally. 378Part V:The Part of Tens