Showing posts with label persistent liveusb. Show all posts
Showing posts with label persistent liveusb. Show all posts

Saturday, June 6, 2009

Fedora Live USB and Persistence

The disk of my 5 year old machine failed. I wanted to explore the possibility of using it from a 2GB flash disk. The liveusb creator of Fedora with persistence seemed very convenient. All I needed was a second machine to browse the net and use my primary desktop with ssh.

I wanted to add the usual multimedia applications and the persistence filesystem proved very flaky. Even backing up the persistence snapshot and installing rpm's - a few at a time did not work. The snapshot was repeatedly marked as bad.

Since the problem is likely to be the old hardware, a better workaround was needed. I did not wish to create a new live image from scratch.

I extracted and mounted the LiveOS image on the desktop and then add the desired packages to them. The steps were:

$ cp path-to-usb/LiveOS/squashfs.img .
$ sudo mount -oloop squashfs.img /mnt

Now extract the files from the squash file system
$ sudo cp -r /mnt live
$ sudo umount /mnt

Mount the ext3 image used by the LiveOS
$ sudo mount -o loop live/LiveOS/ext3fs.img /mnt

Add the repositories for rpmfusion as per http://rpmfusion.org/Configuration but adding the root option.
$sudo rpm --root=/mnt -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Now, it was simple to use yum
$sudo yum -y --installroot=/mnt install gstreamer-plugins-bad gstreamer-plugins-ugly

The new squashfs can now be created

$ mksquashfs live squashfs.img

Finally, the new squashfs can be copied to the flashdisk.
As a precaution, I recreated the overlay file, e.g. a 256MB file as below

$dd if=/dev/zero of=overlay-FEDORA-6EB6-DB4C bs=1M count=256

I liked the Fedora 11 beta liveusb, but somehow, I could not get ssh -X to work with my Fedora 10 desktop. I will wait to try again but after the official release so that I can update the desktop as well.

Ubuntu uses a different mechanism for creating persistent storage on the USB disks. I plan to explore that as well and see if that is less flaky on my hardware.