Ubuntu on bootable thumbdrive

I have created a bootable thumbdrive containing Ubuntu 10.04. It works fine, but has one minor issue. When I boot a system, it writes a new fstab relevant to that system. That fstab persists, so that if I boot another system the "old" fstab is read and the O/S tries to mount filesystems that don't exist on the current system. Obviously I can just hit the "S" key at boot to skip that mounting, but I would like a more elegant solution. I think that executing a script to re-write my fstab with just a single line for to mount /proc will be fine. Currently, I do this manually just before shutting down. I have read about startup and shutdown scripts, but the literature that I have read indicates that those scripts are used for starting and stopping services. My questions are therefore:
Is is appropriate to use the shutdown scripts to execute a script for re-writing my fstab?
At what run-level shoud I run that script (runlevel 0?)
Should it be a K script or a S script?

Thanks in advance

Stumpy

Look at PySDM, a PyGTK Storage Device Manager Maybe it is what you need.

But anyway, you can mount partitions by yourself without fstab. You can write scripts (or functions) for every system (or one script with options) - m1, m2, etc. See mount(8) for relevant mount options.

There are a couple of ways of handing this issue. The easiest way if you do not need persistent information on your USB stick, assuming that you have a casper-based setup, is to simply modify syslinux.cfg to remove the persistent directive.

Thanks for the replies, so far.

The problem isn't manually mounting partitions, the problem is the O/S reading the fstab at boot. I need the system to either stop reading the fstab at boot or re-write the fstab (with a single entry for /proc) at shutdown. I need the system to be persistent because I am constantly adding scripts to it. Any other suggestions gratefully received.

Stumpy