Kubuntu Breezy - Absolute beginners

Freitag, März 24, 2006

Dual boot on external USB Drive with a BootCD (with Bios not supporting boot from external device)

For Christmas I got a wonderful external USB Drive which I only used for backups until now.
Since I couldn't wait to test Kubuntu Dapper Test 5 I decided to make a dual boot with my Breezy, and to install the new system on my usb drive.
There is a wonderful HowTo do to so here in ubuntuforums.
But you can only use this HowTo if your Bios supports the option "Boot from USB device".
So what do to if it doesn't? No need to be sad, you can just create a boot CD to get your system running on USB.

First step: INSTALLATION
Firstly, you have to install the new system to your usb disk. If you have already a LinuxSystem on your computer, you can use the entire free space on your usb device for ext3, mount point / (except you want to have a special partition for /home, but let's assume you don't), because your first system has already a swap partition. If your first system is NOT a Linux, then you need to create a Swap-Partition, too.
So let's say you install your new Kubuntu to the first partition of your usb device. This means it is on (hd1,0) respectively something like /dev/sda1 (it may differ in your system I'll use this for this post. Make sure that everytime I use /dev/sda1 you use the correct path for your system!).
At the end of the installation process you will be asked where you want to install GRUB. I suggest you don't install it on your first HD (because if you're using Windows maybe you'll have troubles afterwards), better install it on the first partition of your usb Device (usually /dev/sda1). Anyway, you won't be able to boot your new system from Grub due to your bios.

Second step: CREATE THE BOOT CD

The boot cd works like a boot floppy, but since lots of laptops (like mine) don't use floppy anymore, we need a boot cd. To do so is easy.

If your first system is a Linux
I. Just boot. Make sure after boot you have access to the external HD (and your freshly installed system). Then install the package syslinux. In Kubuntu you can just do so with adept (just search for syslinux and install).
II. Make a directory called bootcd (in your konsole: mkdir bootcd). Copy isolinux.bin into your new folder bootcd:
cp /usr/lib/syslinux/isolinux.bin bootcd/isolinux.bin

III.Then copy the kernel image of your new system from /Path_of_your_new_system/boot to bootcd/linux.
In our example the command would be:
cp /media/sda1/boot/vmlinuz-2.6.15-19-386 bootcd/linux

Of course the number behind vmlinuz depends on the version of the kernel ofr your new system. Just have a look into the /boot folder of your new system an you'll see. The command above does not only copy the file, but also rename the copy to "linux".
IV. Then copy the initrd.img of your new sytem from /boot to bootcd/initrd.img. In our example:
cp /media/sda1/boot/initrd.img-2.6.15-1 bootcd/initrd.img

Here too, replace the number with your kernel and make sure that the copied file is renamed to initrd.img.
V. Then you'll create the isolinux.cfg file. Open kwrite and paste the following line:
DEFAULT linux initrd=initrd.img ro root=(your-root-dev)

(your-root-dev) is the partition where you installed your new system, in our example the line would look like this:
DEFAULT linux initrd=initrd.img ro root=/dev/sda1

Save the file in the bootcd folder.
VI. Now it's time to make the iso. Cd into the directory above bootcd and type this command into your konsole (all in one line without break):
mkisofs -o bootcd.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -hide-rr-moved -R bootcd/

And - voila - your iso! Burn it to cd and restart your computer.

If your first system is NOT linux
You need a liveCD and a USB-Stick.
For the LiveCD I recommend Knoppix. With Knoppix you can install and even remove programs during a LiveSession (you can also save your settings as an image to a usb-stick) -- and syslinux is even already installed.
Boot Knoppix, then follow the steps as described above, just save the created iso to your usb-stick (the iso will be about 7MB). Then reboot into windows and burn the iso to a cd.

Credits go to: comm[A|n]der and TheDemonInsed from #kubuntu-de, also to the guys from ubuntuforums (Breezy on external HD and Make Ubuntu BootCD).

2 Comments:

Kommentar veröffentlichen

<< Home