[PATCH] fails to boot if RAID (dm-) devices are present

Bug #388407 reported by Tormod Volden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: casper

If there are block devices that are not detected by is_nice_device() but have a filesystem on them, they will get trapped by the "ugly hack situation" (sic) where casper assumes the squashfs is directly on the device. This happens for instance with my fake RAID, for which /lib/udev/path_id() returns nothing.

The result is that casper goes on to get the squashfs and root fs from this device and fails miserably, instead of continuing looking for the correct partition.

One solution is to not probe dm devices, although I think raid partitions ought to be treated as normal disk partitions:

--- casper.orig 2009-06-17 13:32:42.000000000 +0200
+++ casper 2009-06-17 13:34:37.000000000 +0200
@@ -536,7 +536,7 @@ find_livefs() {
         fi
     fi
     # or do the scan of block devices
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|fd)"); do
+ for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|fd|dm)"); do
         devname=$(sys2dev "${sysblock}")
         fstype=$(get_fstype "${devname}")
         if /lib/udev/cdrom_id ${devname} > /dev/null; then

Another solution is to accept dm devices in is_nice_device(), but I don't know if I am too generous here:

--- casper.orig 2009-06-17 13:32:42.000000000 +0200
+++ casper.nice 2009-06-17 13:34:03.000000000 +0200
@@ -126,6 +126,7 @@ is_nice_device() {
     if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb)|platform-mmc)"; then
         return 0
     fi
+ echo ${sysfs_path} | grep -q "^/block/dm-" && return 0
     return 1
 }

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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