[Bio-linux-dev] [Fwd: Re: NuGO Desktop]

Tony Travis a.travis at abdn.ac.uk
Mon Sep 14 11:31:53 EDT 2009


Tim Booth wrote:
> Hi Tony,
> 
> Yes, we did run into this problem, I think.  Stewart thought he'd solved
> it by modifying the shutdown part of the Casper scripts to force a sync.
> His notes say:

Hello, Tim.

I've seen the changes Stewart made but, in our tests, his code was never 
executed unless we changed it to unconditionally sync. His parsing of 
the kernel command line did not seem to work for us. However, the ext2 
filesystem corruption still occured even when we forced casper to sync.

It seems this problem is well-known in Ubuntu 8.04.1, and a patch was 
made to casper to deal with it by remounting the / and /cow filesystems 
read-only before shutting down:

   http://launchpadlibrarian.net/28114350/casper

In addition, the official Ubuntu "usb-creator" backport uses a container 
file to hold an ext3 filesystem instead of mounting an ext2 partition:

   https://launchpad.net/ubuntu/hardy/i386/usb-creator/0.1.10~hardy1

I've watched the boot process carefully without quiet or splash on the 
kernel command-line, and ext3 completes any unfinished transactions at 
the next boot. This version seems quite robust in my experiments so far, 
but it takes a long time to create USB sticks using "usb-creator", so 
I've been modifying "bio-linux-usb-maker" to use a container file. I'll 
do some more experiments before making a decision about using an ext2 
partition or not, but I'd welcome any feedback you can give about why 
the 'official' Ubuntu "usb-creator" does not use an ext2 partition?

Part of my solution is to base our NuGO live DVD on Ubuntu 8.04.3, which 
has an updated kernel and initrd.gz on it. The casper problems seem to 
have been reported mainly in relation to the 8.04.1 live CD.

We plan to encourage NuGO people to make use of persistent sessions on 
our NBX-sticks and also for them to use persistence to install updates, 
so our "casper-rw" filesystems have got to work reliably :-)

Bye,

   Tony.

> ---
> Orginator: BT
> Date reported: 10 Dec 2008
> Issue: USB stick problem on reboot seems like the disk failed to sync
> before it was ejected.
> 
> Suggested fix if any: The script /etc/init.d/casper controls the
> shutdown and call on /sbin/casper-snapshot to sync disks. This is
> supposed to work for USB stick as well as DVD but it might need to be
> forced to sync.
> Fix implemented: Edited the /etc/init.d/casper file within the squash
> fs. In the subroutine do_stop created a condition that checks for the
> word "persistent" in /proc/cmdline which can be used to differentiate
> between usb and dvd. If system is running off usb the shutdown steps do
> a sync before allow ubuntu to complete the shutdown and NO MESSAGE is
> printed. With the DVD version it runs as before printing a message to
> remove the disk and close the tray before pressing enter. Tested and
> fixed.
> Fix implemented by: SH
> ---
> 
> I remember at the time we reckoned the problem was that the live system
> printed a message saying "please remove the disk" before completing the
> shutdown.  This is fine for read-only media but any read-write volumes
> were left still mounted and if you just pulled the stick out you left it
> corrupted.  The solution was to ignore the message and finish shutting
> down with the stick still plugged in.  Stewart's tweak makes this happen
> automatically.
> 
> It's possible that Stewart missed something, but we've had few reports
> of problems since his fix.  We tell people not to do important work on
> the live systems - it's so easy just to knock the thing and make it stop
> working and this leads to corruption of the FS.  There is no automated
> fsck at boot, but so far manual fsck has been enough to get things
> working again in all problem cases I've seen.
 > [...]
-- 
Dr. A.J.Travis, University of Aberdeen, Rowett Institute of Nutrition
and Health, Greenburn Road, Bucksburn, Aberdeen AB21 9SB, Scotland, UK
tel +44(0)1224 712751, fax +44(0)1224 716687, http://www.rowett.ac.uk
mailto:a.travis at abdn.ac.uk, http://bioinformatics.rri.sari.ac.uk/~ajt




More information about the Bio-linux-devel mailing list