1

My USB which had worked OK for a week or so suddenly no longer works.

It boots up to the Ubuntu logo showing the blinking progress spots until the screen suddenly goes dark and a scrolling text message is displayed. It scrolls so fast I have great difficulty reading it. I tried the advice of one of the subscribers and tried typing ESC and also pressing the ESC key. This did produce some text but I couldn't read it all as it kept scrolling so fast.

After much concentration I think I managed to get one line read verbatim. It appeared after a lot of entries which seem to be OK'd and reads as follows:

[157.187130] [drm:intel-enable-lvds [i915]<ERROR>timed out waiting for panel to power on

The above line is replicated repeatedly but each starts with a different ref #.

I was installing a program when I got a message that I was out of memory and the installation couldn't proceed. I shut down thinking that I would gain memory space since the installation hadn't completed. I thought I would then be able to reboot and once up and running delete some programs to free up space. Unfortunately I wasn't able to boot up properly again.

I would be grateful if anyone could enlighten me as to what, if anything, I can do to rectify this.

Obviously, I could just build another USB live boot but I had quite a number of programs installed and I had problems with every one of them struggling to install them (which wasn't the case when using Knoppix 8.1 live USB where it worked right from the start and all Linux and Wine programs installed easily and worked perfectly).

Zanna
  • 70,465
Col
  • 11

3 Answers3

1

Before putting a lot of effort into fixing the persistent USB, consider a full install to a USB instead. Persistent installs lack certain important things, like kernel security updates.

There are lots of suggestions from a Google search on:

  free up space on an Ubuntu persistent USB  

Your options:

  1. Use a bigger persistent file if less than 4G.
  2. Use a Persistent partition for larger than 4G storage.
  3. Use a home-rw file for up to 4G more storage,
  4. Cleanup the existing persistent storage.

The persistent storge file just contains a ext filesystem, which may be mounted with the loop option. Remove things like /var/log files, /var/cache/apt/archives deb files, etc. A new (larger?) file may be created (empty), moutned, then filled with the old information.

ubfan1
  • 17,838
1

A Persistent install uses a file or partition named casper-rw, (or home-rw). A casper-rw file is usually located on a FAT32 partition, and is limited to 4GB by the file system, however YUMI can make larger casper-rw files on a NTFS partition. Persistent partitions are only limited in size by disk size and are generally on an ext2 or ext4 file system.

If casper-rw becomes full the persistent drive will not boot.

A casper-rw file can be mounted and data removed to make the drive bootable again.

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 the 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 fresh casper-rw file). It will contain all your home folder data, or you can make the boot drive using YUMI to make a large NTFS casper-rw file, or use mkusb to make 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.

Nowadays with large USB3 flash drives, Full installs are quite practical. A Full install is more secure, can use encrypted home directory, is updateable, upgradeable, boots faster, makes better use of disk space, can use proprietary drivers, etc, However a Full install is not much use for installing Ubuntu, and takes longer to make.

Home can be moved from casper-rw to home-rw using rsync, (I prefer grsync for the GUI).

C.S.Cameron
  • 19,519
0

Backup and restore a persistent live drive

Persistent live drives are sensitive to corruption. So it is a good idea to have a good backup routine.

Repair a persistent live drive

  • Even when the file system of the casper-rw file/partition is healthy, there are problems, when it is full.

    • boot from another drive or boot live-only (without the boot option persistent) into the persistent live drive
    • create directories to be mountpoints
    • mount the casper-rw file system (loop mount if in a file)

       sudo mount /dev/sdxn mountpoint   # casper-rw partition
      
       sudo mount /dev/sdxn mountpoint1  # casper-rw file
       sudo mount -o loop mountpoint1/casper-rw mountpoint2
      
    • remove some files that are not necessary

    • unmount and reboot, and persistence will work again, if the only problem was that it was full.
  • If the file system of the casper-rw file/partition is damaged you can repair it according to the following link,

    Repair the partition table and file system of a pendrive

    sudo e2fsck -f /dev/sdxn             # casper-rw partition
    sudo e2fsck -f mountpoint/casper-rw  # casper-rw file
    

    where x is the drive letter and n is the partition number.

  • If the damage is too severe, repairing the file system may not help, and the only options are to

    • restore from a backup
    • try to recover the most valuable files with recovery tools, for example testdisk or photorec from cgsecurity.org

Install Ubuntu into a USB pendrive

It can be a good alternative to create an installed Ubuntu system in a fast USB 3 pendrive. This is described with many details in the following link,

Boot Ubuntu from external drive

sudodus
  • 46,324
  • 5
  • 88
  • 152