I am looking for a way to copy the existing Ubuntu server 12.04 to a USB (with all the packages and such) and make it boot from the USB.
I have seen other threads about copying the CD image to the USB, which is not exactly I am looking for.
Before I start diving into anything I was wondering if any of you experts here would give me a direction to start.
Never mind I decided I do the installation from scratch on to the USB.
However another question if I wanted to clone that USB using the
dd if=/dev/usb1 of=/dev/usb2
It should copy everything from the first USBbyte for byte including the boot loader.
Provided that they are the same size/USB2 is bigger...
Will this make the USB2 bootable?
A scratch installation sounds like a better idea, shrinking and moving all those partitions while technically possible sounds fraught with peril.
Correct, the drive's contents determine whether it's bootable, there's no hidden other things.
Be sure to copy the entire device, i.e. /dev/sdc, and not a partition, /dev/sdc1 etc. Not necessarily sdc of course.
You'll probably want to add 'bs=4M' to your dd command to speed it up. It just makes it copy in larger blocks. Should be easier on your flash drives too.