Casper can't find cow device when mdadm RAID disks are attached

Bug #965735 reported by Micah R Ledbetter on 2012-03-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Undecided
Unassigned

Bug Description

I created a casper 1.287.1 -based livecd using this guide: <https://help.ubuntu.com/community/LiveCDCustomization>. I'm using Oneiric on an i386 system. I have removed the "quiet" argument and added "nosplash" argument to the bootloader.

When I boot my livecd on a system with no disks, or with non-RAID disks, it will boot completely with no errors. However, if I try to boot on a system with disks that have a RAID array created by mdadm, it will fail to an (initramfs) prompt on virtual console 1. If I change to VC7, I see an error: "No init found. Try passing init = bootarg". Here's a longer log file from VC7:

    Begin: Running /scripts/init-premount ... done
    Begin: Mounting root file system ... [ 4.956222] sd 6:0:0:0: Attached scsi generic sg4 type 0
    [ 4.956342] sd 6:0:0:1: Attached scsi generic sg5 type 0
    [ 4.956437] sd 6:0:0:2: Attached scsi generic sg6 type 0
    [ 4.956543] sd 6:0:0:3: Attached scsi generic sg7 type 0
    [ 4.964779] sd 6:0:0:0: [sdd] Attached SCSI removable disk
    [ 4.965530] sd 6:0:0:0: [sde] Attached SCSI removable disk
    [ 4.966415] sd 6:0:0:0: [sdf] Attached SCSI removable disk
    [ 4.977920] sd 6:0:0:0: [sdg] Attached SCSI removable disk
    cp: can't create '/root/var/log/': Is a directory
    cp: can't create '/root/etc/': Is a directory
    done.
    Begin: Running /sripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
    done.
    mount: mounting /sys on /root/sys failed: No such file or directory
    mount: mounting /proc on /root/proc failed: nNo such file or directory
    Target filesystem doesn't have requested /sbin/init.
    No init found. Try passing init= bootarg

From the (initramfs) prompt, I can see that the /cow filesystem was never mounted. If I run ". /scripts/casper-helpers", and then "find_cow_device", it returns "/dev/md127".

When I run "find_cow_device" from a working system (NOT in initramfs, though - I'm not sure how to make it drop me a prompt), it returns "/dev/ram0".

Has anyone else encountered this? Any help is much appreciated.

Micah R Ledbetter (mrled) wrote :

I've attached the casper.log I got when I typed "live debug=" from the isolinux prompt.

Micah R Ledbetter (mrled) wrote :

Possible workaround:

I discovered that my livecd boots all the way through if I remove the mdadm hook from iniramfs:

    rm /path/to/livecd-chroot/usr/share/initramfs-tools/hooks/mdadm

As a result, mdadm arrays are still assembled by my livecd filesystem, but they're not assembled by the initrd phase.

It seems to me that this *should* be OK when building a livecd, but I'm not knowledgeable enough to know if it has some other undesirable consequeunces. If I run into anything, I'll make sure to reply here...

Changed in casper (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.327

---------------
casper (1.327) quantal; urgency=low

  [ Tim Lunn ]
  * add gnome-shell favorites tweak to 25adduser
  * Add 16gdmnopasswd script, removes gdm password dialog for live user.

  [ Stéphane Graber ]
  * Fix casper when running on some RAID systems. (LP: #1047316, LP: #965735)
  * Apply patch by Tyler Gates to try and better handle dm devices, should help
    with the above change too. (LP: #865529)
  * Use /sys/class/net/ instead of hardcoded eth* devices.
    (LP: #905828, LP: #962546)
  * Allow overriding username/userfullname/hostname on the boot command line
    as is mentioned in the manpage but was never implemented.
    Note that when using persistence, those used for the first boot will be
    remembered through /etc/casper.conf (LP: #907482)
  * Reset oem-config/enable to false every boot. (LP: #838680)
  * Add Breaks/Replaces to ubiquity-casper to properly upgrade when both
    casper and ubiquity-casper are installed. (LP: #1046300)
  * Apply patch by cleary to avoid hang in 41apt_cdrom when .disk/info doesn't
    exist. (LP: #909919)
  * Eject by block device instead of mountpoint, this should avoid ejecting
    the cdrom on USB installations. (LP: #869238)
  * Add 'check' target to debian/rules based on ubiquity's (LP: #570243)
 -- Stephane Graber <email address hidden> Wed, 03 Oct 2012 17:46:39 -0400

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

Other bug subscribers