1

I have created an Ubuntu16.04 'Persistent Pendrive' which was working perfectly for about a month, but now it seems to be running out of space.

Specifically: I used the information in this link, see also my notes, to create my Pendrive on a SanDisk 32GbUltra Flair and I've used it to run apache and php as a mini development server on various hardware.

However - I'm now getting 'out of space' errors when I try to run sudu apt-get update. I was under the impression that any new software or changes would be applied to the persistent partition, not the OS partition.

I'm happy enough to start again, but has anyone else had this, or know how to prevent it?

  • You'd probably have fewer problems if you installed a full OS to yourPendrive. That would achieve your description of the purpose you described in your question. – L. D. James Apr 4 '17 at 15:26
  • An installed system (like installed into an internal drive, but to a USB pendrive) is easier to keep completely up to date. But there are problems with excessive wear of the memory cells. There are methods to decrease the wear. See this link, help.ubuntu.com/community/Installation/… – sudodus Apr 4 '17 at 15:51
  • Cheers- that's the next avenue for investigation, and you're right, it would be a better solution for what I want to do, assuming that it would accommodate being used on different hardwareplatforms. As I understand it, one of the benefits of using a LIve Iso is that it 'adapts' to the hardware its being used on - unless I've mis-understood something. – JamesBB Apr 5 '17 at 6:46
1

Persistent live drives are more sensitive than standard installed systems

Persistent live systems can use a file or partition for persistence, a casper-rw file (as created by most tools) or a casper-rw partition (as created by mkusb). The file system in the casper-rw file or partition is vulnerable to corruption. That said, there are ways to keep a persistent live system running.

  • Avoid filling the system's storage (the casper-rw partition).

  • Allow the system to shut down completely (flushing the buffers in RAM to the casper-rw partition). Never unplug the USB drive while the computer is running. I'm sure you know this, but sometimes it is difficult to wait, and it is a common cause of failure.

  • Avoid general update & upgrade. Only install necessary extra program packages, do the tweaks and keep 'what is absolutely necessary' up to date.

  • If you want a major update & upgrade, keep/backup the .../upper/home directory (in the casper-rw partition) and create a new system (with mkusb using a new iso file) and after that copy .../upper/home to the new casper-rw partition. Do this when booted live-only.

  • Back up the casper-rw partition at regular intervals. Backup and restore scripts are bundled with mkusb. Do this when booted live-only.

  • Remember to backup also the data files in the usbdata partition (if you have such a partition).

    See the following links,

    help.ubuntu.com/community/mkusb

    help.ubuntu.com/community/mkusb/persistent


More differences between persistent live and installed systems

The persistent live systems are compared to systems installed into a USB pendrive in the same way as into an internal drive.

  • Both systems are portable between computers. A persistent live system is more portable, because it is set up with a vast amount of hardware drivers. An installed system should be installed without proprietary drivers to be portable.

  • A persistent live system needs less drive space because a lot of program packages are stored in a compressed file system. On the other hand it needs more RAM because the compressed file system is expanded into RAM.

  • A persistent live system performs less write operations but an installed system can be tweaked to reduce the writing to avoid excessive wear of the memory cells. See this link.

  • A persistent live system cannot use new kernels. Normal program packages can be updated & upgraded. An installed system can be completely updated & upgraded.

  • You can install (an installed system) with disk encryption. In principle, a persistent live system in not encrypted, there is not even a log in feature, but you arrive directly at the desktop environment.

  • A Ubuntu persistent live system can boot in both UEFI and BIOS mode, while an installed system is normally created for either UEFI or BIOS mode, but not both. It is possible to tweak an installed system to boot in both UEFI and BIOS mode according to the following link,

    help.ubuntu.com/community/Installation/UEFI-and-BIOS

  • Many thanks! Looks like my error was to run updates then. You say " An installed system should be installed without proprietary drivers to be portable." - could you provide a link to instructions for that setup? – JamesBB Apr 5 '17 at 6:51
  • Will you boot computers in UEFI mode or BIOS mode or both? If only one of the modes, remove the internal drive in a computer, where you want to install Ubuntu (into a USB drive). Do not 'install third-party software'. Install 'the standard way' using the whole drive. See for example this link, iso.qa.ubuntu.com/qatracker/milestones/351/builds/145214/… – sudodus Apr 5 '17 at 7:06

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.