partman-auto-raid refuses to allow /boot inside raid + LVM when using preseed.cfg partman-auto/expert_recipe

Bug #1701102 reported by James A. T. Rice
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-auto-raid (Ubuntu)
Fix Committed
High
Colin Watson

Bug Description

Having /boot reside inside a logical volume as part of a mdraid mirror does work when configured manually, however it is impossible to preseed with partman-auto/expert_recipe.

At some point, preseeding "partman-auto-lvm/no_boot boolean true" started to allow /boot to be inside LVM - partman-auto-lvm-56ubuntu1/lib/auto-lvm.sh contains:
        # Make sure a boot partition isn't marked as lvmok, unless the user
        # has told us it is ok for /boot to reside on a logical volume
        if echo "$scheme" | grep lvmok | grep -q "[[:space:]]/boot[[:space:]]"; then
                db_input critical partman-auto-lvm/no_boot || true
                db_go || return 255
                db_get partman-auto-lvm/no_boot || true
                [ "$RET" = true ] || bail_out unusable_recipe
        fi
)

However, partman-auto-raid-30ubuntu1/display.d/initial_auto_raid_lvm doesn't allow exceptions, and /boot can not be inside an lvm on raid volumes:
# Make sure a boot partition isn't marked as lvmok
if echo "$scheme" | grep lvmok | grep -q "[[:space:]]/boot[[:space:]]"; then
        bail_out unusable_recipe
fi

Could a relaxed check similar to partman-auto-lvm be added to partman-auto-raid, so that /boot inside LVM inside mdraid can be preseeded as part of partman-auto/expert_recipe?

Thanks
James

d-i partman-auto/method string raid
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto-lvm/no_boot boolean true
d-i partman-auto-raid/recipe string \
        1 2 0 lvm - raidid=1 .
d-i partman-auto/expert_recipe string \
        myrecipe :: \
                1000 5000 40000 raid \
                        $lvmignore{ } \
                        $primary{ } \
                        method{ raid } \
                        raidid{ 1 } \
                . \
                1000 1000 1000 ext4 \
                        $defaultignore{ } \
                        $lvmok{ } \
                        method{ format } \
                        format{ } \
                        use_filesystem{ } \
                        filesystem{ ext4 } \
                        mountpoint{ /boot } \
                . \
                6000 6000 6000 ext4 \
                        $defaultignore{ } \
                        $lvmok{ } \
                        method{ format } \
                        format{ } \
                        use_filesystem{ } \
                        filesystem{ ext4 } \
                        mountpoint{ / } \
                .

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

I knew that clone-and-hack I did in partman-auto-raid would come back to bite me eventually. The partman-auto-lvm change was https://bugs.debian.org/610377, so I'll adopt that change here too.

Changed in partman-auto-raid (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Colin Watson (cjwatson) wrote :
Changed in partman-auto-raid (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Paul McEnery (pmcenery) wrote :

I have been attempting to preseed install 19.10 (eoan) and discovered that this fix has not yet made its way into Ubuntu yet. Does anyone have any idea when the fix is likely to make it in? Would be nice if it was available in LTS (18.04) as well.

If you are quick enough to edit /lib/partman/display.d/56initial_auto_raid_lvm and comment out the relevant section in the upstream fix, the installation continues without bailing out.

I would have hoped that almost 2.5 years would be sufficient time for an upstream sync...

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.