Upon completion, you will be able to save files back to the root of your Flash Drive (which is mounted as /cdrom) while your running from Ubuntu. Save your documents, photos, movies, mp3's, special configuration files etc… back to the Flash drive. In addition you can add files while running from Windows and then access those files again while running from Linux or vice versa.
The following solution should work for Ubuntu, Kubuntu, Linux Mint etc. Pretty much any Ubuntu derived compilation.
How to edit the Casper script to allow read and write access to the entire USB device:
- Boot from your previously created USB Ubuntu Flash Drive
- Open a terminal and type sudo su (to become root)
- Type mkdir /projectaccess (to make our project directory)
- Type cd /projectaccess (to change to the project directory)
- Type gzip -dc /cdrom/casper/initrd.gz | cpio -i (to extract the initrd.gz)
- Type gedit scripts/casper (to edit the casper script)
- From gedit, find the following section of code:
Code: Select all
home_snapshot_label="home-sn"
- Just below it add the following code:
Code: Select all
mountmode="ro,noatime"
- Now find the following section of code:
Code: Select all
IGNORE_UUID="Yes" ;;
- Just below it add the following code:
Code: Select all
# New command line parameter to select the base device mount mode basemountmode=*) mountmode="${x#basemountmode=}";;
- Now find the following section of code:
Code: Select all
if is_supported_fs ${fstype}; then
- and (as a single line of code) change the next line to:
Code: Select all
mount -t ${fstype} -o ${mountmode} "${devname}" $mountpoint || continue
- Save the file and return to the open terminal
- From the terminal type find . | cpio -o -H newc | gzip -9 > initrd.gz (to zip the new initrd.gz file)
- Type cp initrd.gz /cdrom/casper
- Type gedit /cdrom/syslinux/text.cfg
- On the first append line, replace the following section:
Code: Select all
initrd=/casper/initrd.gz
- With the following section (as a single line):
Code: Select all
initrd=/casper/initrd.gz basemountmode=ro,noatime,uid=999,gid=999
- Save the file and exit the editor
- Reboot your computer and proceed to boot from your USB Flash Drive again