Here's the scenario: I would like to use a live USB to boot up my computer sometimes and access large programs that I want to run in Ubuntu only. However, I only have access to an 8gb USB drive, and the programs I'm looking at are around 50gb and upwards. From my research, I think I have to set up persistence, but instead of saving files to my USB, I want to be able to save files to my computer without messing up my current operating system and whatnot. How do I do that?

EDIT: If I mount my hard drive, is there anything I have to do to make my programs install there, and how can I do it so that my OS settings are stored on the USB (So I can take it with me), and my large programs are still on my OS.

EDIT: Errors with mkusb

Drive that contains source file: /dev/sda
Live drive, that is booted from: /dev/sda


built-in device
USB or memory card
p_target: target=/dev/ 7.5G
No target device or bad target device
  • I often use NFS mounts (ie. network fs) even from 'live' media. I can mount wherever I want it; though smaller stuff I just save locally & scp to a server for storage (SaMBa/cifs could be used also, so you don't have to use a local mounted hdd/persistence). Note: 'live' uses memory for everything & installing large programs/updates can run a 'live' out of memory in my experience... – guiverc Feb 7 '18 at 7:07

Persistent live with a casper-rw partition in the internal drive

  • You can create a persistent live drive with mkusb according to the following links,



  • Ubuntu will search for a file with the name casper-rw or a partition with the label casper-rw, and use the first one that it finds. So you can

    • remove or re-label the casper-rw partition on the USB pendrive (created by mkusb),
    • In Windows shrink the Windows partition (typically C:) and leave the freed drive space as 'unallocated'.
    • Boot live-only from the Ubuntu live drive, 'Try Ubuntu',
      • start gparted and
        • create a partition in the unallocated drive space and
        • in the partition create an ext4 file system
        • set the label casper-rw on this partition
    • Now, when you reboot the Ubuntu live drive, you should be able to boot persistent live and it will use the casper-rw partition in the internal drive. It should be possible to install your large programs and they are stored (automatically) in the casper-rw partition in the internal drive.

Test that it really works

enter image description here

As you can see in the screenshot, the casper-rw partition in the internal drive /dev/sda is 49 GiB, and it is used for persistence. The operating system is running from a [16 GB] USB pendrive /dev/sdb, where the automatically created casper-rw partition is re-labeled to casper-off.

| improve this answer | |
  • This is exactly what I was looking for! Thanks! I guess I have to rename my usb pendrive from casper-rw and back each time I want to use it on a different computer. – Led Feb 7 '18 at 7:44
  • It is enough to re-label the casper-rw partition in the USB pendrive. I tested that it really works with a Lubuntu system (and I will add a screenshot to the answer). – sudodus Feb 7 '18 at 7:54
  • Also, do i have to partition the c drive in windows, or can i do it once i'm in ubuntu? – Led Feb 7 '18 at 8:07
  • It is much safer to shrink the C: partition and the NTFS file system with Windows, and after that use Ubuntu to create a partition in it. 'Manage Windows file systems with Windows tools, and linux file systems with linux tools'. – sudodus Feb 7 '18 at 8:09
  • I tried using mkusb, but I'm having the same problem as in this post: askubuntu.com/questions/899341/… I'm also using a sandisk usb, but only with 7.5gb. I get the same errors for both live installation and persistant. I'm using Ubuntu 17.10 – Led Feb 7 '18 at 8:16

You could probably mount the hard drive of the computer as it is.

To find what partitions you have on the system run
sudo fdisk -l

Then mount the apropriate partition
sudo mount /dev/device /mnt/mountpoint

You might need to specify type of the device. Use
-t type
where type can be ntfs or other file formats supported by your live USB.

| improve this answer | |
  • So if I mount the hard drive, are there any things I have to watch out for? Such as overwriting important files, or it will i be able to navigate files just like in windows, and when I boot up windows I can access those same files? Sorry about so many questions, I'm really new to linux so bear with me. – Led Feb 7 '18 at 6:47
  • The windows disk will be a part of your ubuntu file system. As such it is possible to erase files, but it will not happen by itself or by just mounting the file system. Since you are running windows it will be necessary to use the falg -t ntfs to the mount command – ReineS Feb 7 '18 at 7:08

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.