2

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)
3
  • You can't modify partitions while they are in use. You will need to boot from a different device to modify the partitions of the usb drive. But are you sure /dev/sdb3 is the correct partition? That name means third partition (3) of the second disk (b). Live USBs only have one partition, at least in my experience.
    – wjandrea
    Aug 8, 2016 at 17:07
  • Having another partition for data storage on your live USB is a choice for live USB creation time, not after you've booted from it.
    – waltinator
    Aug 8, 2016 at 17:12
  • Thanks for your responses. There seem to be one small efi-partition, and the larger ubuntu partition. I'm not trying to create the data partition in the live system, I've clarified my question. Aug 8, 2016 at 17:14

2 Answers 2

0

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.

2
  • Just to confirm before I find a way to get windows: Can you use the data partition from within the live-booted system? That's where I'm having trouble. Aug 8, 2016 at 19:57
  • Yes, I have created one for Linux and it works for Windows installation as well. I created a folder on each of them to put drivers and common programs. As well as notes, install keys whatever you want. Whatever is not used by the files needed to boot all the extra is there as a regular thumb drive.
    – dambergn
    Aug 9, 2016 at 22:32
0

Use mount option -o loop

For the reasoning see the accepted answer of: Live USB, mount second partition on same device

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .