Bug#504397: ext2_or_ext3_boot check fails when /boot is RAID
We have a partman check that ensures on some devices that the /boot
partition is the 1st primary partition. Unfortunately this check
fails when /boot is a RAID device, but it's actually valid for /boot
to be a RAID1 device (as long as its physical partition is the 1st
There's currently no good way to map the RAID device to its physical
partition to performs these checks, so I was thinking of applying a
patch for lenny to skip the check if the /boot device is RAID1.
OK to apply? (I don't think many users are affected by this, so this
--- check.d/ext2_or_ext3_boot (revision 57101)
+++ check.d/ext2_or_ext3_boot (working copy)
@@ -60,6 +60,17 @@
# The boot file system has to be the first primary partition
+# ... but for now don't run the check if /boot is on RAID1. Right now,
+# there's no good way to map a RAID device to its physical partition
+# and then run the checks on that partition (see #509799).
+if echo $boot_path | grep -q "^/dev/md"; then
+ if grep "^$raid" /proc/mdstat | grep -q " raid1 "; then
+ exit 0
part_num=$(echo "$boot_path" | sed -e 's/.*[^0-9]\+//')
if [ "$boot_type" != primary ] || [ "$part_num" -ne 1 ]; then
db_set partman/boot_not_first_partition true
--- debian/changelog (revision 57101)
+++ debian/changelog (working copy)
@@ -1,9 +1,16 @@
partman-ext3 (56) UNRELEASED; urgency=low
+ [ Colin Watson ]
- partman-ext3/no_mount_point is a boolean, not a select (thanks,
Nicolas Valcárcel; LP: #256459).
+ [ Martin Michlmayr ]
+ * check.d/ext2_or_ext3_boot: when a RAID1 partition is used for /boot
+ don't check whether it's the 1st primary partition. There's no good
+ way to map a RAID partition to its physical partition at the moment.
+ (Works around #504397).
-- Colin Watson <email@example.com> Fri, 26 Dec 2008 13:56:13 +0000
partman-ext3 (55) unstable; urgency=low