2

I created a live Ubuntu on a SanDisk 32GB USB-stick using LiLi with Ubuntu 17.10.1. During the creation I chose to have a persistance layer of 4GB. After running a couple of recoveries from the stick, the persistence layer filled up completely (no space left on device). Now Ubuntu is booting up to the point where it should ask if we want to install or try Ubuntu. The dialog is empty except the points that indicate the different pages in it. At this point, the network is connected, but it's not possible to continue to the live system. Using Ctrl+Alt+F[1-10] is not bringing up any login shells. I assume this is due to the completely full persistence layer (casper-rw if I'm correct). Is there any possibility to either:

  1. Boot up the system?
  2. Access the files on the persistence layer?

Answers are much appreciated because it took ~13h to create the file index from a broken disk.

Pascal
  • 123
  • 3

2 Answers2

2

To mount casper-rw file, (booting from a second drive).

Create directory:

sudo mkdir /media/casper

Then mount drive:

sudo mount -o loop casper-rw /media/casper/

After a few files are removed Persistent drive should boot.

If you need more persistence space, you can create a home-rw persistence file up to 4GB, (by copying and renaming a casper-rw file). It can contain all your home folder data, or you can make the boot drive using mkusb which uses an unlimited casper-rw partition.

If you will be needing to update or upgrade your boot drive it is probably best to do a Full install to the drive.

C.S.Cameron
  • 19,519
1

I agree with C.S.Cameron, and I will add some details and links.

Steps to more space for persistence:

  • Create a home-rw persistence file up to 4GB and move your current home from casper-rw to this partition in your current persistent live system.

    • Boot from another drive (or the same one, but live-only without the boot option persistent).
    • Create directories to become mountpoints.
    • Mount casper-rw and home-rw, for example to the mountpoints /media/casper-rw and /media/home-rw.
    • Then you can use rsync to copy /home like so (first a dry run, then remove the n and do the job),

      sudo rsync -Havn /media/casper-rw/upper/home/ /media/home-rw  # dry run
      
      sudo rsync -Hav /media/casper-rw/upper/home/ /media/home-rw   # do the job
      

      The trailing slash in .../upper/home/ is important, see man rsync.

    • When you have checked that persistence is working from home-rw, you can remove the /media/casper-rw/upper/home directory tree.

  • Create a new persistent live system with a partition labeled casper-rw for persistence (and if you wish also a partition labeled home-rw.

    See these links: mkusb and mkusb/persistent

    enter image description here

  • Install Ubuntu (like into an internal drive) but to a USB drive,

    See this link: Boot Ubuntu from external drive

If you intend to keep the Ubuntu system on the USB drive up to date, and/or if you need to install a lot of program packages, it is better to install Ubuntu (like into an internal drive) but to a USB drive. Such a system is portable between computers, but not as portable as a live or persistent live system.

It can be a good idea to install an Ubuntu community flavour with a light desktop environment, Lubuntu, Ubuntu Budgie, Ubuntu MATE or Xubuntu, because the communication is slower to a USB pendrive than to an internal hard disk drive or solid state drive. (A USB 3 SSD is fast alternative.)

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 1
    I have been doing some experimenting on splitting a casper-rw file into a casper-rw file plus home-rw file, and doing similar with a casper-rw partition. This can be handy for upgrading a persistent drive say from 16.04 to 18.04. The home-rw file/partition can be reused after version upgrade but the casper-rw file/partition can not. I am not sure yet about permissions. I think copy casper-rw then rename to home-rw, and delete everything but home folder. Then delete home folder in casper-rw. – C.S.Cameron Apr 09 '18 at 17:54
  • @C.S.Cameron, I checked the details and edited the answer with details how to copy /home from casper-rwto home-rw- I did it by converting the usbdata partition to home-rw with the ext4 file system in a persistent live drive made with mkusb. – sudodus Apr 09 '18 at 19:35
  • I think you can move the home folder from casper-rw to the a home-rw partition. This makes it easier to "version upgrade" a persistent drive. – C.S.Cameron Apr 09 '18 at 21:04