partman hangs when partman-basicfilesystems/no_swap set and no LVM swap partition provided in expert recipe

Bug #1745696 reported by Chris McCoy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
New
Undecided
Unassigned

Bug Description

partman hangs when partman-basicfilesystems/no_swap is set to true and no LVM swap partition provided in expert recipe.

* Conditions:

Ubuntu 16.04.3LTS,

Preseed configured with:

d-i partman-basicfilesystems/no_swap boolean true

d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-partitioning/default_label string gpt
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/new_vg_name string flexflash
d-i partman-auto/choose_recipe select partlayout
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/expert_recipe string \
   partlayout :: \
      538 538 1075 fat32 \
         $iflabel{ gpt } \
         $reusemethod{ } \
         method{ efi } \
         format{ } \
         . \
      500 500 500 ext2 \
         method{ format } \
         format{ } \
         use_filesystem{ } \
         filesystem{ ext2 } \
         mountpoint{ /boot } \
         . \
      25600 25600 -1 xfs \
         $lvmok{ } \
         lv_name{ root } \
         method{ format } \
         format{ } \
         use_filesystem{ } \
         filesystem{ xfs } \
         mountpoint{ / } \
         .

* Issue

I believe the bug is caused by inverted return boolean in:

/lib/partman/check.d/10check_swap

if ! $swap; then
 db_input critical partman-basicfilesystems/no_swap || true
 db_go || true
 db_get partman-basicfilesystems/no_swap
 if [ "$RET" = true ]; then
  exit 1
 fi
fi

Shouldn't script return 0/true when swap not found but partman-basicfilesystems/no_swap is set to true?

* Workaround

d-i partman/early_command string sh -c 'sed -i "s^exit 1^exit 0^" /lib/partman/check.d/10check_swap; echo "exit 1" >> /lib/partman/check.d/10check_swap'

Revision history for this message
Chris McCoy (cmm-x) wrote :

You might disregard and close this bug. I probably have my understanding of basicfilesystems/no_swap inverted.

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.