Ubuntu: After apt upgrade - getting “(initramfs) unable to find a medium containing a live file system” on custom Live USB



Question:

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.


Solution:1

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.


Solution:2

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »