How to clear persistent storage on live Linux USB?

0

1

I created a live Ubuntu USB that has persistent storage using Universal USB Installer. Every time I boot the USB, I keep getting an alert message telling me that the drive is low on space. Is it not possible to clear or remove files in persistent storage?

Flint

Posted 2012-06-30T14:35:44.293

Reputation: 166

What operating system are you on? – Arvanitis Christos – 2012-06-30T15:39:40.597

Answers

3

Yes it is possible.

If you're booting from the USB, you don't want to repartition the whole thing, you just want to recreate the loopback casper-rw partition.

I've just done it with a Karmic Koala USB stick from 2009. Current ones may work a bit differently (I've been on a bit of a holiday from Ubuntu the last year or so).

Enable expert mode and remove "persistent" from the kernel boot command line. Then it won't even try to use the casper-rw file for persistence (it will use a ramdisk overlay instead).

Say your usb stick is mounted at /cdrom (for some reason that's what I got).

You will need to do

sudo mkfs.ext3 /cdrom/casper-rw

and prompt it to proceed even though the file is not a block device.

If it complains that your USB stick is mounted read-only, use

sudo mount -o remount -o rw /cdrom

first, to make it read-write.

You can also do the mkfs command line on any other working linux system where you can mount your USB stick.

Jonathan Maddox

Posted 2012-06-30T14:35:44.293

Reputation: 31

0

You should use dd command to delete the partition table of USB and later use gparted to repartition the USB.

dd bs=1024 count=1 if=/dev/zero of=/dev/sdb where /dev/sdb is your usb drive, be carefull with this command!

And start gparted to repartition.

alejo0317

Posted 2012-06-30T14:35:44.293

Reputation: 111