casper:try_snap() uses bad option

Bug #384059 reported by phl
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Fix Released
Medium
Colin Watson
casper (Ubuntu)
Fix Released
Undecided
Colin Watson

Bug Description

Binary package hint: casper

Ubuntu 9.04

(casper|home)-sn.cpio.gz do not work because casper:try_snap() does "cpio -i -u -d" which fails as for initrd/bin/cpio only -i is allowed.

Removing -u -d solves the issue.

Revision history for this message
Colin Watson (cjwatson) wrote :

It's unfortunate that klibc's cpio is incompatible with the rest of the world; I think we should probably arrange to detect whether it's in use. 'grep -aq /lib/klibc "$(which cpio)"' should be a reasonable (if hacky) test.

Changed in casper (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.178

---------------
casper (1.178) karmic; urgency=low

  * Ensure that unionfs-fuse isn't killed by /etc/init.d/sendsigs on
    shutdown (LP: #386010).
  * Patches from "phl" (https://launchpad.net/~ubuntu-leledy), adjusted by
    me, to fix snapshot resync:
    - Avoid using cpio -u -d options if klibc cpio is in use (LP: #384059).
    - Copy /etc/casper.conf into /root, otherwise we forget snapshot resync
      settings (LP: #384061).
    - Adjust the first field of *SNAP entries in casper.conf to be relative
      to /cow, not /root (LP: #384066).
    - Prefix $DEST with $MOUNTP in casper-snapshot (LP: #384068).
    - /etc/init.d/casper is usually called with 'start', so handle that as
      well as 'stop' to do snapshot resyncing and CD ejecting (LP: #384076).
  * Fix casper-snapshot(1) syntax to avoid missing spaces between options
    and their values.
  * Fix showmounts when used in conjunction with unionfs-fuse; read-only
    filesystems need to be bind-mounted rather than move-mounted.

 -- Colin Watson <email address hidden> Fri, 12 Jun 2009 13:24:28 +0100

Changed in casper (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lauritz Thaulow (lauritz-pvv) wrote :

Fix does not work for me, from boot.log:

Warning: Unable to find the persistent home medium
/init: line 7: which: not found
Warning: Impossible to include the casper-sn.cpio.gz Snapshot

I don't know why it says line 7, but the placement in between those two lines implies that it's this line that's causing the message:

cpiopath="$(which cpio)" || true

And that's because which is not included in the initramfs. Perhaps a line should be added to the casper hook script for that?

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks. Sounds simplest to just enable which in busybox.

Changed in busybox (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.17.1-8ubuntu3

---------------
busybox (1:1.17.1-8ubuntu3) natty; urgency=low

  * [initramfs] Enable which (LP: #384059).
 -- Colin Watson <email address hidden> Wed, 09 Feb 2011 12:42:44 +0000

Changed in busybox (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.