How to Fix Ubuntu 8.04 Casper script for Persistence

Along with the final release of Ubuntu 8.04 came a bug which broke the persistence feature, ultimately dropping the user to a shell when booting with the persistent option. As it turns out, the problem lies with permissions being set to 755 for the cow device (strangely enough the prereleases did not have this problem). In the following tutorial, I will show you how to quickly fix the problem. This is the same process we used to create the custom initrd.gz file that is distributed with our Ubuntu, Kubuntu and Xubuntu 8.04 Hardy Heron related USB flash drive installation tutorials.

Note: There is no need to proceed with this tutorial if you have used any of our Ubuntu, Kubuntu or Xubuntu 8.04 USB installation tutorials. This process is being provided for advanced users who want to know what was changed and prefer to attempt the fix themselves.

Fixing Ubuntu 8.04 Casper script for Persistence:

  1. Download Ubuntu 8.04 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 scripts/casper (to edit the casper script)
  8. From gedit, find the following section of code:

    mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,mode=755 /cow

  9. From the line of code, remove ,mode=755. The resulting code should appear as follows:

    mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || panic "Can not mount $cowdevice on /cow"

  10. Save the changes to update the casper script
  11. Type find . | cpio -o -H newc | gzip -9 > initrd.gz (to zip the new initrd.gz file)
  12. 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)

That concludes this simple tutorial on fixing Ubuntu 8.04 for Persistence.

*Ubuntu is a product of Canonical Ltd