Hack 34 Install Knoppix on a Multiboot System

 < Day Day Up > 

figs/moderate.gif figs/hack34.gif

A lot of people who use Linux also dual-boot their computer to Windows. The two most worrisome parts of such a setup are partitioning the drive and configuring the boot loader. Here's how to install Knoppix in a multiboot setup .

Installing Knoppix in a dual-boot configuration is a bit trickier than a clean install, as it requires you to resize partitions to make room for Knoppix and possibly requires you to configure your boot loader. This hack walks you through a typical Knoppix install that dual-boots with Windows. This walk-through assumes that Knoppix is being installed on a computer with a single IDE hard drive containing a single Windows partition that fills the drive.

As in the single-boot system example [Hack #33] , start the Knoppix installer with the following command:

 knoppix@ttyp0[knoppix]$  sudo knoppix-installer  

You are prompted to create partitions for Knoppix to install to. The entire hard drive is filled with a single Windows partition, so you have no free space to create a partition. Luckily, you can resize your Windows partition with qtparted , which can resize both FAT32 and NTFS partitions.

Resizing a partition can be risky, and there is always a potential for data loss. Before resizing any partition, defragment the hard drive completely from within Windows; otherwise , a file fragment near the end of the partition might be deleted when the partition is resized. Of course, it is always a good idea to back up any important data.


To resize your hard drive from within qtparted , select /dev/hda from the list of disks on the left side of the qtparted window, then click on the /dev/hda1 partition listed on the right side and select Operations Resize. In the resizing window that appears, you can decide how much free space to leave after the partition. In my experience, I've needed to create a root partition of 2.2 GB to have enough room for the Knoppix files. In our example, resize the partition so that 2.5 GB of free space is available, so you have enough room for the 2.2 GB root partition and a swap partition. After you click OK, qtparted displays the free space you have just created in the main window. Now click on the gray free space, and create a swap partition and a 2.2 GB root partition, as covered in [Hack #33] . Once you are finished resizing, click File Commit to actually perform the resizing and partition creation. After you commit the changes, close qtparted to return to the main installer menu.

The next step is to configure the installation by selecting a username, password, and so on. Once you are finished, click Start installation to start copying the files to the partition. After this process, you are prompted to create an optional boot floppy, after which the installation is complete.

During the install process, Knoppix attempts to automatically detect any Windows partitions on the drive and will add them to the boot choices in /etc/lilo.conf . If you are multibooting with another Linux system, be aware that Knoppix overwrites your boot loader with its version of lilo. To fix your lilo.conf file so you can boot both your new Knoppix install and your old Linux install, finish the Knoppix install, then mount the root partition for your new Knoppix install. Then edit the etc/lilo.conf file and update lilo , as in [Hack #52] . Restart the computer and remove the CD-ROM from the drive, and you should see a new boot prompt with options for booting either Linux or Windows.

If you would like to change the OS form which your system boots by default, boot into your new Knoppix install and edit the /etc/lilo.conf file as root, changing the line that reads default="Linux " to default= " Windows(hda1) " or whatever label your Windows partition is assigned at the bottom of the file. Once you have edited the file, run /sbin/lilo as root to apply the changes.


You should now be able to boot either into Knoppix or Windows. Similar to booting from the CD, the Knoppix hard-drive install has your Windows partition icons on the desktop so you are still able to access files in the same way you are accustomed.

 < Day Day Up > 


Knoppix Hacks. 100 Tips and Tricks
Knoppix Hacks. 100 Tips and Tricks
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net