How to create bootable usb from pre-installed Ubuntu?

I am a new Ubuntu user. Whoever helped me assumes that I've actively downloaded Ubuntu and so have an ISO. But I got Ubuntu pre-installed, and want to create a bootable USB backup.

No idea what to point the Startup Disk Creator to. (This seems to be a good thing to have, maybe as a link for more info, on the How To Do It guides.)


Solution 1:

I was writing this recipe when you hurried up to accept an answer, anyway this took a while to write, so here it is.

One of your best chances to have such a "copy" of your current pre-installed operating system is to clone the installation itself, which will result in an exact operational copy of your hard disk drive's installed OS but in a bootable USB/SD/MicroSD card.

A relatively similar question was asked before, but the question was exactly the opposite of what you wish to achieve in this task. Anyway the same answer is useful for both your case and the previous question, you can reach it right here: Installing/Cloning from Ubuntu Installed and Running on USB to HD

Additionally you may wish to take a look at this answer: https://askubuntu.com/a/176110/9598 and this: https://askubuntu.com/a/106585/9598 or this: https://askubuntu.com/a/106585/9598. Note that they are basically the same answer but additional answers provided by different users in the same questions may give you a clue on how to do this task.

For your specific case, I suggest you to first check out how much disk space is your current pre-installed operating system using. This detail is important in order to gather the proper size's USB/SD/Micro SD Card so that the whole operating system can fit on that device. I am aware that Cloning can be done from smaller disks to a bigger one. But I haven't experienced yet with cloning from bigger to smaller disks so I can't suggest you about it. Which lead us to the next:

If the File system is bigger than the USB/SD/Micro SD Card, let's say: you have your current pre-installed OS In a 160 GB Hard disk drive, but it is only using 4 GB for the OS and other 20GB for documents, music, pictures and other data, you should decrease the partition itself in order to fit to the new device's size, let's analyze the scenery:

Having in mind a disk as of 160GB with 24 GB Total disk used (20 data, 4 OS) and wish to clone your OS into a 16GB USB/SD/Micro SD Card.

The recipe:

Ingredients

  1. A Live CD/USB with Ubuntu and gparted
  2. A Live CD/USB with Clonezilla

The directions

  1. You need to decrease the current 160GB partition to something like 30 GB and leave the other 130GB unused.
  2. Then let's create a container for spare space, the same size as your data, 30 GB so far. (from now on "spare partition")
  3. Now let's create a bigger container for the data backup, the last 100GB (from now on "backup partition")
  4. Next, move your data (documents, pictures, music, etc.) into your backup partition in order to keep your data apart from the cloning process.
  5. We need to match the new device's size and the partition size, so let's reduce again the system partition for a maximum of 16GB, leaving the remaining 14GB unused. You will then have a partitioning like this:

    |--SYSTEM-16gb--||--UNUSED-14gb--||---SPARE-30gb---||---------BACKUP-100gb---------|

  6. This is the point where we start Clonezilla and run a cloning from device-device, to work directly from a disk-partition to disk-partition, in this case we are going to clone from "partition to disk"

  7. After the cloning finishes and if you already checked that the USB properly boots, then we need to revert the process in order to leave your computer "as it was" before cloning your OS.

  8. First we're going to expand the system partitions from its current size to the unused 14 gb in order to make it as of 30GB, size where you can put your backup data again in order to:

  9. Remove the spare-30gb and the backup-100gb partitions in order to leave that space unused.

  10. Expand the system partition to fill the 160gb of your hard disk drive.

  11. And enjoy.

That seems to be a hard process but it is not indeed, it will take an hour or less, depending on your computer and the speed of your hard disk drive/optical drive (which will read the Clonezilla process).

For the operations related to resizing the partitions you can use gparted in a live CD, and you may wish to take a look at the answers to this question: Why I'm seeing a lock besides the partition I'm trying to modify with gparted? in order to understand how to achieve that task, further information about gparted and Live Gparted images for both CD and USB can be reached right here: http://gparted.sourceforge.net/

REMEMBER: That you can't resize a partition that is currently in use (the system partition). So make sure you first run all the partitioning process before starting the cloning process.

Serve it cold and in companion with your favorite drink.

Good luck!

Some extra-explanations:

  1. The spare-partition: It is not required at all but I strongly suggest to make it in order to have extra space in order to keep your data apart from the cloning process or in case that you need extra space for resizing/moving your partitions.
  2. When cloning: make sure you answer "yes" (just a "y" without quotation marks) when the Clonezilla asks you if you wish to clone the boot sector, otherwise your USB/SD/Micro SD Card won't boot.
  3. Remember: It is strongly recommended to leave the OS alone, (with no user data) and to include the all the software that you wish to keep in the cloned device before cloning, nevertheless, after cloning you can run updates and/or install new software in the cloned device.
  4. You may wish to use dd instead of Clonezilla, of which I won't give any explanation but you can find lots of answers over here.
  5. When serving the recipe: make sure to include a glass with ice and Cuban rum for me.

Solution 2:

Disclaimer: Creating a bootable USB without using the downloaded ISO but the pre-installed Ubuntu is a little complicated for new users. If you want that, see the answer below. This answer gives two simpler alternatives.

Make a standard bootable Ubuntu USB from within pre-installed Ubuntu (simple)

Frist, check the installed version of Ubuntu by opeining a terminal (press Ctrl+Alt+T) and type lsb_release -a.

Note down the version number and OS Type (32bit or 64bit).

Second, download the ISO from http://www.ubuntu.com/download/desktop, by selecting the appropriate version.

Third, insert an USB drive (4GB or greater for Ubuntu, 2GB or greater for Lubuntu, Xubuntu).

The Startup Disk Creater takes two inputs, the location of the ISO file and the location of the USB drive.

Fourth, point the Startup Disk Creater to the ISO and the USB drive.

See the help on Create a usb stick on ubuntu for a simple set of instructions.

Also see a more detailed instructions on USB stick creation

Remastersys does not exist anymore.

The next section is obsolete.

Make a custom bootable backup Ubuntu USB from pre-installed Ubuntu (Complicated)

First, Add Remastersys source information to Software Center. Open Software Center and click on “Edit” and select “Software Sources.”

Select the “Other Software” tab at the top and you need to click the “Add” button, and copy and paste this:

deb http://www.remastersys.com/ubuntu precise main

And then click “+Add Source”, then click "Close" and completely close out of Software Center.

Add the PGP key for the Remastersys repository, in Terminal (press Ctrl+Alt+T) copy the two lines below one line at a time and paste (press Ctrl+Shift+V) in Terminal:

wget -O - http://www.remastersys.com/ubuntu/remastersys.gpg.key | sudo apt-key add -
sudo apt-get update

Second, install Remastersys. Open Software Center and search for and install remastersys.

Third, run Remastersys. Click on "Backup" and wait a long time till it finishes creating the ISO file.

Fourth, create startup USB following instructions above.

More detailed information and some qualifications on how to do this is here. Hope this helps.