This might be a little bit redundant with other posts, but I thought I share my experience with installing kubuntu on my external USB drive and post a quick guide:
Here are the steps:
1) Connect your usb drive to your computer and boot from a kubuntu installation CD
2) Install kubuntu as usual. Just select the usb drive as target for the installation. USB drives show up as /dev/sdX. Where X will be 'a' if you have only one usb drive connected to the computer. Note the following
A) Don't install a bootloader on the master boot record. You will create a bootable CD later.
B) I recommend a partitioning of the hard drive with
> cfdisk /dev/sdX
since the kubuntu partitioner did not work for me. You need the usual partitions (swap, root which I made bootable, and in my case a backup partition). You can format the partitions you created. For example, I used
> mkfs.ext3 -m 0.1 -c -j -v /dev/sda6
for my backup partition.
A note: After the installation wizard is done, it will try to reboot, but fail. From my experience this does not matter. I could boot kubuntu fine after creating a boot CD.
3) Create a boot CD:
> mkdir iso
> mkdir -p iso/boot/grub
> cp /usr/share/grub/i386-pc/stage2_eltorito iso/boot/grub # you have to have grub installed
Create a config file menu.lst in iso/boot/grub/ that contains:
------------------------------------------------------------------------------------------
default 0
timeout 10
title kubuntu from USB
kernel /boot/vmlinuz-<your kernel> root=/dev/sda? ro single
initrd /boot/initrd.img-<your kernel>
boot
------------------------------------------------------------------------------------------
Of course, you have to replace <your kernel> with whatever kernel version you have installed on your usb drive, and the '?' in /dev/sda? with the partition number of your usb installation root directory. In my case this was /dev/sda5. Copy your kernel and the initrd file into ./iso/boot and any other file that might be useful. I also copied the system map file and the config file into the directory.
Finally, make a ISO9660 image file in the directory where you created the iso directory.
> mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso
and burn the iso file on a CD.
5) Boot kubuntu from your USB drive: Connect the usb drive to the computer, boot from the CD ,and keep your fingers crossed. You won't be able to boot if you have other usb drives connected and the drive where you have kubuntu installed is not assigned to /dev/sda. In this case grub will report an appropriate error. I suggest (1) to disconnect other usb drives or (2) to include more options in your grub menu for /dev/sdb, c, d or whatever you want.
Installing kubuntu on an external USB is surprisingly easy and provides a good backup solution in case your computer dies and you have urgent things to take care of. I backup my laptop hard drive on the usb drive and if the laptop dies, I can use any desktop to keep working until I get my laptop back.
Have fun,
Martin
Here are the steps:
1) Connect your usb drive to your computer and boot from a kubuntu installation CD
2) Install kubuntu as usual. Just select the usb drive as target for the installation. USB drives show up as /dev/sdX. Where X will be 'a' if you have only one usb drive connected to the computer. Note the following
A) Don't install a bootloader on the master boot record. You will create a bootable CD later.
B) I recommend a partitioning of the hard drive with
> cfdisk /dev/sdX
since the kubuntu partitioner did not work for me. You need the usual partitions (swap, root which I made bootable, and in my case a backup partition). You can format the partitions you created. For example, I used
> mkfs.ext3 -m 0.1 -c -j -v /dev/sda6
for my backup partition.
A note: After the installation wizard is done, it will try to reboot, but fail. From my experience this does not matter. I could boot kubuntu fine after creating a boot CD.
3) Create a boot CD:
> mkdir iso
> mkdir -p iso/boot/grub
> cp /usr/share/grub/i386-pc/stage2_eltorito iso/boot/grub # you have to have grub installed
Create a config file menu.lst in iso/boot/grub/ that contains:
------------------------------------------------------------------------------------------
default 0
timeout 10
title kubuntu from USB
kernel /boot/vmlinuz-<your kernel> root=/dev/sda? ro single
initrd /boot/initrd.img-<your kernel>
boot
------------------------------------------------------------------------------------------
Of course, you have to replace <your kernel> with whatever kernel version you have installed on your usb drive, and the '?' in /dev/sda? with the partition number of your usb installation root directory. In my case this was /dev/sda5. Copy your kernel and the initrd file into ./iso/boot and any other file that might be useful. I also copied the system map file and the config file into the directory.
Finally, make a ISO9660 image file in the directory where you created the iso directory.
> mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso
and burn the iso file on a CD.
5) Boot kubuntu from your USB drive: Connect the usb drive to the computer, boot from the CD ,and keep your fingers crossed. You won't be able to boot if you have other usb drives connected and the drive where you have kubuntu installed is not assigned to /dev/sda. In this case grub will report an appropriate error. I suggest (1) to disconnect other usb drives or (2) to include more options in your grub menu for /dev/sdb, c, d or whatever you want.
Installing kubuntu on an external USB is surprisingly easy and provides a good backup solution in case your computer dies and you have urgent things to take care of. I backup my laptop hard drive on the usb drive and if the laptop dies, I can use any desktop to keep working until I get my laptop back.
Have fun,
Martin
Comment