10

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

  • This is a very annoying problem. If anyone has a solution, please post it. – Hashken Jul 8 '13 at 4:40
  • Did you figure this out? – Jason Kleban Jan 19 '14 at 14:50
  • @uosɐſ: Nope, not yet. Can't say I've spent a lot of time trying, though... – Tomas Aschan Jan 25 '14 at 10:48
  • Hey Tomas Lycken, did you find any solution for this? – VishalDevgire Dec 2 '16 at 21:12
8

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.

  • Best answer here so far, should work fine – doug Jun 3 '14 at 20:33
  • Only solution that worked. – learner Nov 11 '15 at 18:36
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.

  • This works better than re-partitioning...! – Grim Aug 8 '18 at 20:14
  • This is the way to go on ubuntu 19.04, thank you. – Dan Charousek May 11 at 12:33
0

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!

0

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.

0

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.

0

I was able to make it work with Ubuntu.

Steps:

i. Create two primary partitions on your usb drive.

  • Partition#1 Fat32
  • Partition#2 ext4

ii. Use Unetbootin to create startup disk on first partition

iii. Boot from pendrive, select 'Try Ubuntu without installing'

iv. Now start Installation Wizard from desktop

v. Select language and other options

vi. Select second partition on Pen Drive as root (/) partition

vii. Select /dev/sdb (not /dev/sdb2) to install boot loader

viii. Before hitting Install Now, open a terminal and type: sudo umount -l -r -f /cdrom

ix. Hit 'Install Now', installation should complete successfully

-1

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.

  • 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 Aschan Aug 25 '13 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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