Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
This is a very annoying problem. If anyone has a solution, please post it. –  Karthik Jul 8 '13 at 4:40
    
Did you figure this out? –  uosɐſ Jan 19 at 14:50
    
@uosɐſ: Nope, not yet. Can't say I've spent a lot of time trying, though... –  Tomas Lycken Jan 25 at 10:48
add comment

6 Answers 6

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.

share|improve this answer
    
Best answer here so far, should work fine –  doug Jun 3 at 20:33
add comment

Once upon a time, I was experimenting with ArchLinux and read about this issue.

The information is on https://wiki.archlinux.org/index.php/USB_Installation_Media

There is a section 'without overwriting the USB device'. But it's talking about the Syslinux-bootloader, not GRUB2-bootloader. So maybe this information is not relevant.

Good luck!

share|improve this answer
    
Nope, this didn't help much, unfortunately =( –  Tomas Lycken May 2 '13 at 12:55
    
Maybe Pendrive is a solution : pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux –  user85164 May 2 '13 at 15:50
add comment

I don't know how to choose the partition before installing, but what I normally do is to install Ubuntu onto the whole pendrive, and then resize it and add the other partitions.

This will remove the data already on your drive, though - you'll have to back it up somewhere and copy it back when your done.

share|improve this answer
add comment

I use MultiSystem for my LiveUSB drive to try out several Linux distros without installing them, but I think this software might fit your use case.

You can keep the live ISOs and your data on the same partition when using MultiSystem, because they do not affect each other and live alongside without concern. That is because MultiSystem install GRUB2 on your drive, managing the ISOs and a couple of tools but not caring about whatever else is on the drive.

Therefore, instead of managing two partitions, you could create a folder in the root directory of your only partition called "Data" (or whatever suits you) and use that folder just like you would have used your data partition.

Alternatively, you could just drop your data directly into the root directory of your drive, though that would require you to be careful about not touching the files MultiSystem requires to boot your live ISO.

I never used the Startup Disk Creator, so maybe you can actually just use that tool and create a Data folder on your drive.

share|improve this answer
add comment

I used NetBootin to install to the partition I wanted. My Data partition was NTFS and my Ubuntu partition was ext2, but you could probably use ext4. UnetBootin didn't even acknowkledge the NTFS partition, and instead automatically selected the ext2 partition, and install went well. The Boot Disc Creator didnt work for me either.

share|improve this answer
    
I think you misunderstood the question - I have no problem choosing the partition to install Ubuntu on the correct partition on my laptop (I already have an NTFS data partition and a couple of ext4 partitions for the OS), but I want to create a Live USB stick that only uses a small fraction of the stick for the live OS. –  Tomas Lycken Aug 25 '13 at 12:28
add comment

You need help? I'll be glad to help you.

OK, go ahead and install UNetBootin from the Ubuntu software center. In the search pane type

Unetbootin

Now click install next to unetbootin. It'll prompt you your password, go ahead, enter it.

After installed, open UNetbootin from the dash.

You'll see a easy to use interface. Select the distribution as

13.04

or if you can't find that

12.10

Then under Diskimage, find the Ubuntu 13.04 image. Now here is the important part.

At the way bottom, allocate the number of megabytes you want to store files. If you are not sure how to figure how to convert from GB to MB, go to Google.

Then type in:

Convert (number of gigs) GB to MB

Now type in the number of gigs in that box.

Select

USB Drive

from the menu, and then select your drive where the USB is.

Click

OK

After that completes, you are done!

share|improve this answer
1  
This still only lets me choose the drive - I have no options for the partitions on the drive. I'm looking for a method that will make my USB stick a bootable Ubuntu installation stick without touching (and guaranteed not to touch) the data partition on the stick. What you suggest gives me nothing that the default startup disc creator doesn't already have. –  Tomas Lycken Apr 27 '13 at 4:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.