1

I realise that similar questions have been asked before in multiple posts. Some are linked at the end of this question. But my situation is a little different and I couldn't find any post addressing this.

I have created a Live USB Ubuntu 16.10 Desktop, with persistent storage. I have successfully booted into it and installed software such as Chrome, Eclipse and done an apt-get upgrade. These changes have persisted across reboots previously.

Now I am trying to boot the same USB Key on the same USB port of the same laptop. But I am getting the error:

(initramfs) unable to find a medium containing a live file system

It seems that the upgrade / software installation process has brought this error on. Has anyone seen such behaviour before? Any tips?

I have tried booting into the laptop and also into VMWare player using Plop Boot Manager. Same error.

I have already seen the below posts and tried their suggestions with no luck:

Thanks in advance for your help.

Vipul Swarup
  • 111
  • 3
  • In order to make it easier for others to help you, explain what didn't work from the other questions that you linked. What kind of error did you get? Or did you get stuck somewhere? – M. Becerra Dec 29 '16 at 10:48
  • Hi - thanks for your response. I would get no error except that it would reach the screen saying "(initramfs) unable to find a medium containing a live file system" – Vipul Swarup Dec 30 '16 at 05:57
  • 1
    Possible duplicate of [Error when installing: "unable to find a medium containing a live file system"](https://askubuntu.com/questions/15425/error-when-installing-unable-to-find-a-medium-containing-a-live-file-system) – karel Jan 12 '19 at 17:48

2 Answers2

0

This sounds like the casper-rw persistence file has been filled and has no more space left.

It is generally recommended not to do an update on a persistent usb drive as this quickly fills the casper-rw file which is limited to 4GB in size.

It is not possible to easily do an upgrade to a Persistent or Live drive as the kernel is part of a read only squashFS file.

To confirm if this is the problem try temporarily renaming the casper-rw file and rebooting.

You can also mount and access the casper-rw file thus:

mkdir /tmp/casper
sudo mount -o loop /path/to/casper-rw /tmp/casper

If you are using a casper-rw persistent partition, it can be accessed from a second Live USB or Live DVD.

Automatic updates should be turned off with persistent drives.

Edit: If the drive was made using mkusb there is probably a NTFS partition named usbdata.

If this partition gets fragmented, as NTFS partitions sometimes do, you can get the same error message. Try backing up and reformatting this partition.

There is a chance that this partition can be defragged in Windows 10. I prefer not to mess with multi partition flash drives in Windows.

Fragmenting can be a sign that the drive was unplugged while being written to, don't do that.

C.S.Cameron
  • 18,890
  • 10
  • 64
  • 105
  • Thanks for that. Seems that doing the apt-upgrade probably was the problem. I don't suppose the casper-rw file is full, because I had extended it's size to 100 GB (following these instructions: http://askubuntu.com/questions/397481/how-to-make-a-persistent-live-ubuntu-usb-with-more-than-4gb). I have mounted the USB on another Linux system. It creates two mount points - "UUI" and "casper-rw". But the file "casper-rw" doesn't seem to exist any longer. Any ideas? – Vipul Swarup Jan 03 '17 at 05:07
  • Sounds like you used mkusb, it uses a casper-rw partition instead of a casper-rw file. One problem is that if the NTFS partition gets fragmented you get that error message. Try reformatting just the usbdata, (NTFS), partition using gparted from a second hard drive. Some people say it can be defragged using windows but I have not gotten that to work. – C.S.Cameron Jan 05 '17 at 07:38
  • Thanks - I have blown away the file system entirely now. Will give it a try again after a few days. Thanks for your help. – Vipul Swarup Jan 06 '17 at 06:20
0

what i did:

create lubuntu 17.04 live usb with unetbootin (with 8gb persistence).

then boot usb and do: sudo apt upgrade

after upgrade powerdown and mount usb and copy:

/casper/vmlinuz.efi to /casper/vmlinuz.efi.old

and rename /casper/vmlinuz to /casper/vmlinuz.efi

boot usb again and all will be fine

gilux
  • 1