Making Ubuntu 7.10 – Casper Persistent

Making a casper persistent Ubuntu 7.10 (Gutsy Gibbon): With the coming release of Ubuntu 7.10 code named "Gutsy Gibbon", most of the portable linux community is likely going to want to run Ubuntu Gutsy from CD, USB or emulated using Qemu. So it only makes sense that, at the very least, we should be able to save and restore settings changes via a persistent partition or img (image).

The live-initramfs that has recently replaced casper works fine as a read/write option when using a "home-rw" partition. But ultimately breaks when you try and utilize a "live-rw" partition. So, if your content with saving and restoring changes using your user home directory, a "home-rw" partition or img (image) works fine using live-initramfs and you do not need to use this tutorial. The only reason to revert back to casper is because the live-initramfs live-rw is currently broken and only the home directory is available for read/write.

Note: In the following tutorial, we simply re-enable the old casper system. This is how the Ubuntu 7.04 casper persistent feature was fixed as well.

Update 7/10/07: It appears that the persistent feature in Gutsy Gibbon has been fixed in the latest release candidate. So this tutorial is left in place only for reference!

How to make Ubuntu 7.10 casper persistent:

  1. Download Ubuntu 7.10 (Gutsy Gibbon) and burn to a CD/DVD
  2. Restart your PC from the CD/DVD
  3. Open a terminal and type sudo su (to become root)
  4. Type mkdir /projectinit (to make our project directory)
  5. Type cd /projectinit (to change to the project directory)
  6. Type gzip -dc /cdrom/casper/initrd.gz | cpio -i (to extract the initrd.gz)
  7. Type gedit init (to edit the init file)
  8. From gedit, find the following section:
  9. break)
    break=premount
    ;;
    esac

  10. Directly above esac add the following:
  11. persistent)
    PERSISTENT=yes
    root_persistence=casper-rw
    home_persistence=home-rw
    ;;

  12. It should end up up like the following:
  13. break)
    break=premount
    ;;

    persistent)
    PERSISTENT=yes
    root_persistence=casper-rw
    home_persistence=home-rw
    ;;

    esac

  14. Save the changes to update the init file
  15. Type find . | cpio -o -H newc | gzip -9 > initrd.gz (to zip the new initrd.gz file)
  16. Then you can copy the new initrd.gz file to your usb flash drive, replacing the old file (or rebuild the iso to include the new file)

To boot persistently, at the boot menu press F6 to enter a custom boot option. Add persistent to the end of the boot string: add persistent to the boot options

*Ubuntu is a product of Canonical Ltd

Disclaimer