0

I wanted to know if anybody knows of a way to "take away" on a bootable USB key my own installed partition from my laptop (currently 13.04) for use on the road. The goal is to have my own fully configured and highly securized environment "on the go" and be able to use it in internet cafés (highly insecure environments) by booting my very own system through the USB stick instead of the stock Windows OS Internet cafés usually have. I have already invertigated several solutions but all were ackward and unnervingly slow... For example using a live-USB with a stock Ubuntu install image and persistent option enabled, is incredibly slow at startup; as it seems to have to "reinstall" everything saved in the persistent memory space atop the original OS image at boot-up...For the complicated environment I have, this is not an option because hundreds of programs and security updates have to reinstall themselves each time at boot up...this takes forever. So, isn't there a way to just sort of copy a working and configured partition on the key and have it boot externally onto any computer allowing it via USB ?

1
  • You can use dd to copy the partition, if the USB stick is large enough to hold it. Oct 27, 2013 at 15:21

1 Answer 1

0

I ported Ubuntu 12.04 server from disk to USB stick successfully a year ago. The steps is as following:

  1. Use parted or fdisk to make partitions in your USB stick, make sure the layout must be similar with your hard disk.
  2. Create LVM if it is on your hard disk.
  3. Make filesystem for each partition in USB stick by mkfs.*
  4. mkdir /target and mount root filesystem onto it.
  5. Synchronize files on each partition in your hard disk to the corresponding partition in your USB stick.
  6. chroot /target and performance grub-install
3
  • Thanks you for your answer. I successfully ported my laptop partition to a stick. But I was disappointed by the poor performance while booting and running on the key. This of course would depend primarily on the USB I/F type (2.x vs 3.x) and the USB key read/write throughput. My attempt was on a 35Mb/s (read) stick over a USB 2.x slot (max 60Mb/s). I have to do some further testing with a faster "SSD type" key and over a USB 3.0 slot; in order to see if this would really be usable on the go. Noatime in fstab, vm.swapiness=0 in sysctl and var/log as tempfs did not really improve things much... Nov 11, 2013 at 13:38
  • On the side, I would like to add another experiment I made that led to much faster performance. By creating a liveUSB stick (non-persistent) with a stock Ubuntu install image, Ubuntu runs nicely fast. Of course, one doesn't have all the packages missing in the liveUSB, but what's needed can be installed after booting. Then, it is just a matter of updating Firefox and Thunderbird to the latest versions - and pasting your own .mozilla and .thunderbird folders (saved on the key as a zip password-protected archive) so as to recover your own environment with those 2 apps. That's all I needed. Nov 11, 2013 at 14:03
  • Your method is great!
    – Like
    Nov 14, 2013 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .