3

I have Ubuntu 14.04 installed on my laptop. Can I clone the entire system with apps, settings, etc on a USB 3 pendrive, and then boot from that on other computers as a portable Ubuntu installation to take around with me?

I am trying a function that Timeshift has that's called "Clone the current system on another device". I've selected the pendrive as the target device. Timeshift was talking about this being bootable. But is it going to bootable on only this laptop, or on any system? For example, on an Intel Mac, or a Windows computer without the grub bootloader? Is that Timeshift function what I am looking for, or do I have to do something else?

Edit: The Timeshift clone failed to boot on the first system I tested it on. (A Dell Hackintosh that usually boots from USB just fine.)

Fiksdal
  • 2,121
  • How big is flash drive? I believe in new install. Then restore backup of /home and list of installed apps. Other systems may have issues with UEFI or BIOS boot, video drivers, and Internet drivers. Best to not install any proprietary drivers. Flash drive to boot in UEFI or BIOS - sudodus https://help.ubuntu.com/community/Installation/UEFI-and-BIOS and: https://help.ubuntu.com/community/Installation/FromUSBStick#Ubuntu_single_boot_in_UEFI_mode and: http://askubuntu.com/questions/559007/is-it-still-possible-to-install-ubuntu-to-an-external-harddrive-with-uefi – oldfred Mar 27 '16 at 14:57
  • @oldfred The USB 3 flash drive is 32 GB, but I can easily get a larger one for this purpose if it's necessary. If I do a fresh install, which tool do you reccomend for restoring the backup of /home and installed apps? – Fiksdal Mar 27 '16 at 15:01
  • 2
    I use rsync for backup of /home and data. But do not backup Ubuntu as it is often just easier to reinstall. I also export list of installed apps, list is long, you may want to edit old kernels out, but it will not reinstall all the default apps. http://askubuntu.com/questions/17823/how-to-list-all-installed-packages and: http://askubuntu.com/questions/545655/backup-your-home-directory-with-rsync-and-skip-useless-folders and: http://askubuntu.com/questions/40992/what-files-and-directories-can-be-excluded-from-a-backup-of-the-home-directory/40997#40997 – oldfred Mar 27 '16 at 15:10
  • The Timeshift clone failed to boot on the first system I tested it on. (A Dell Hackintosh that usually boots from USB just fine.) – Fiksdal Mar 27 '16 at 15:51
  • 1
    Clone is primarily for restoring back to same system. You cannot use a clone on same system as then you have duplicate UUIDs. Also grub, fstab and other issues must be fixed, if you want to use on same system. Part of why I normally suggest new install. – oldfred Mar 27 '16 at 16:26

4 Answers4

3

When you install Ubuntu, you are installing it for that system. If you take that installation and boot it on another machine, it's the equivalent of making hardware changes. Ubuntu will in most cases still boot, but you may need to install drivers specific to the new system, you may need manually reconfigure some things for the new system (eg: sounds, graphics, network interfaces), or it may work flawlessly. It all depends on the hardware. This is not a good approach, unless you are using machines with identical hardware.

Alternatives:

  • There are tools available for making live-DVDs from installations. I used to use Remastersys (outdated, not sure what active alternatives are available), and it worked great.

  • Build a customized Ubuntu ISO. This can be accomplished by extracting the squashfs, chrooting it, making desired changes, repacking, and swapping for the original squashfs in the ISO.

  • Setup a live-flashdrive with a persistence file/partition. Some live-flashdrive creators will even do this for you (eg: Unetbootin)!

  • Use a different distro like Puppy Linux, Porteus, TinyCore Linux, or Slax that is actually meant to be run as a portable OS used with multiple computers.

no-reply
  • 46
  • 2
2

The refork of Remastersys is Systemback. It does exactly what you want -- though you need to do a "two step" (i.e., Step 1: backup live system to USB using Systemback; then Step 2: boot to backup USB and install on a second USB) to create a truly persistent, live copy of your current operating system.

Although (sadly) Kendek has stopped developing Systemback, it is in my opinion one of the best Linux applications ever.

Rsync
  • 1,274
  • 6
  • 19
  • 32
1

Yes you can copy a full Ubuntu OS (with Programs, customizations and all ) from your Desktop or Laptop Hard drive to an external USB Flash Drive or external Hard drive. I just did it for Ubuntu 14.04 LTS to an external Hard drive (but equally applicable to USB Flash drive as well)

Required software / hardware:

  • Destination External Hard Drive / Destination USB Flash Drive to have the cloned OS

  • Source OS (Ubuntu or any other OS that needs to be cloned)

  • USB Drive (with at least with as much capacity (256 MB - 1 GB) as a clonezilla live USB requires)

  • computer / laptop having Windows which can run Live Linux USB creator

Steps:

  • Download Clonezilla from http://clonezilla.org/downloads/download.php?branch=stable (download the ISO)

  • Download Live Linux USB Creator (Lili) from http://www.linuxliveusb.com/en/download

  • Create a bootable Clonezilla (Live Clonezilla) on USB by running Live Linux USB Creator.

  • Configure your Source desktop / laptop to boot from a USB drive

  • Insert both, the destination external hard drive or destination USB Flash drive in 1 USB Slot and the Clonezilla Live USB drive in other slot and boot.

  • Clonezilla will take some time to read partition info When the Clonezilla UI appears, select default menu entries.

  • [With Caution] select Source Partition info and Destination partition info It may be noted that Clonezilla would require space on destination USB Flash drive or external hard disk which is equivalent of the source Hard disk and it will erase all data from the destination USB Flash drive / external hard drive.

  • Once all is selected, Clonezilla will create a live OS on the destination drive / flash drive

Test the cloned OS by removing Clonezilla Live USB drive and booting from the Live OS which has been cloned onto the destination External drive / USB Flash drive.

Enjoy !

AvremyC
  • 111
  • 1
  • Are you sure about this? Did you just do it, succesfully? Does Clonezilla really make the USB drive bootable? That must be some sort of special setting, because I think that normally, Clonezilla just saves an image in compressed format that would definitley not be bootable. Care to elaborate? Is there some sort of special setting that makes Clonezilla make the USB medium bootable? Are you sure about this, and have you really done it yourself? I have actually asked about this before, and the comment I got was that it is not possible: http://goo.gl/5S6izX – Fiksdal Mar 27 '16 at 17:24
  • Apparently some people here successfully did. – Immanuel Weihnachten Jul 29 '21 at 09:46
0

In addition to Systemback, I just found that rsync can be used to create a bootable USB. All you need to do is rsync the live system (it can be from the current booted live system) to the mounted USB drive. You then must make sure that /etc/fstab/ and your boot loader (e.g., rEFInd or GRUB2) have the correct UUID for the USB drive. I was so thrilled to discover this, I thought it should be shared.

Rsync
  • 1,274
  • 6
  • 19
  • 32
  • Can you provide all steps about rsyncing the whole live system to the usb or directly on a new hdd as cloned and fully bootable? – 1000Gbps Mar 06 '21 at 21:23