Creating a startup disk on a partition of a USB drive

I have a 32 GB USB pendrive which I'd like to use as both a startup/installation disk for Ubuntu, and for regular file storage/transfer purposes. Since the Ubuntu installation stuff only needs a little under 3 GB, I thought this would be no problem, but it has turned out to be harder than I thought.

My plan was to create two partitions on the drive - one 4GB that I can wipe at any time and use for installation media, and one with the rest of the space that I can use for data (and won't have to wipe when I create a new installation disk). Creating the partitions posed no problems - gparted did that without complaining - but installing the Ubuntu installation stuff has turned out to be harder than I thought.

In the "Startup Disc Creator" program, I can't select the USB drive's partiions individually - just the entire drive. And if I don't press "Erase disk", I'm not allowed to start the installation. I've tried setting the "boot" flag on the partition I want to use, but it didn't matter. It seems the startup disc creator program isn't "partition aware" - is it? Or do I need to do this with another program?

Is there a way that I can create a bootable USB drive where just one partition is used for the installation media? How?

enter image description here


Solution 1:

I had the same problem. I had a USB Hard drive that had some data on it but was about 80% free that I wanted to use to test out Live CDs on. But the “Startup Disk Creator” would only recognise the disk as a whole and wanted me to erase it, despite it having three partitions (two of which were empty and Ext file systems).

I found a way around this however. I used GParted to delete and recreate the two empty partitions but this time making them FAT32 partitions (the same as the first partition) and also making them both Primary partitions. Once this was done the Startup Disk Creator recognised all three partitions and I was able to use one of them to create a Startup Disk, whilst keeping my content on the first partition. I am not sure why this worked, but it did.

I hope this is of help to people.

Solution 2:

Use Ubuntu's Disks program. Startup Disk Creator freezes from time to time.

Create your partitions using Disks/Gparted, then click on the partition and click on the 'two gears' icon to the right of the '-' then click 'Restore Partition Image'

Restoring Partition Image is what you want.

Restoring Disk Image from the main menu formats the whole drive.