How to move existing Linux installation to USB flash drive and make it bootable?

Is there any possibility to move my already installed Ubuntu Linux to the USB flash drive and make it bootable. So that it would boot on the other machine?

P.S. I have an installed Ubuntu Karmic (9.10) Linux installed on my machine. I want to make it portable, to move it with all installed packages and tuned software to a USB flash drive.


Solution 1:

Although I did not do it myself, I would try recommend the following:

  • Get yourself a USB stick (16G or more) with the base Ubuntu, and set it up with the appropriate partition. If you're using the default Ubuntu disk partitioning (everything under /), that should be easy.

  • Copy all files form all directories to the UST stick

  • run grub-install on the new device, such as /dev/sdb1:

    cd /boot/grub grub-install /dev/sdb

You should be able to boot from your new USB stick.

Solution 2:

Not easily. If i were doing it, i'd do a two step process - move my install to a live cd with remastersys, then install it to a liveusb with some livecd to usb tool