Ubuntu – Ubuntu live usb with extra storage partition

live-usbmountpartitioningusbusb-storage

I'm booting off a live usb and would I also want to use the same usb stick for storing data. I'm not at all interested in full system persistence, but rather to have the stick function as a normal storage device where I can put and read the files of my choice.

I have tried to simply add a partition to the drive (note: not while running the live system) but the problem is I'm not able to later mount this when I've started the live system again. When trying to mount /dev/sdb3 it says it is already mounted or busy, and I'm guessing the problem is that /dev/sdb is mounted at /cdrom.

Does anyone have an idea how to solve this? Can I mount /dev/sdb3 somehow anyway? Can I create the USB in such a way that the live system thinks there's another usb inserted as well and treat that as a normal storage device?

To clarify, this is what I'm doing

  1. Starting my normal ubuntu system (not live)
  2. Writing the ubuntu iso to the usb stick using dd
  3. Using fdisk to add a fat partition, and then formatting the partition
  4. I can use the new partition and add files without any trouble in my normal system.
  5. I live-boot using the stick, and I'm unable to mount the partition.
  6. I can see the partition using fdisk -l and also in thunar, but when I try to mount it, it says "already mounted".
  7. running mount | grep sdb
    gives me /dev/sdb on /cdrom type iso9660 (ro,noatime)

Best Answer

I have been using this http://www.linuxliveusb.com/ for quite some time and it does exactly what you are requesting. The only problem with it is, it is Windows software. But I have been using it for years and you can continue to use it as a flash drive to store data.