[Bug 1745696] [NEW] partman hangs when partman-basicfilesystems/no_swap set and no LVM swap partition provided in expert recipe

Chris McCoy cmm at cisco.com
Fri Jan 26 23:38:05 UTC 2018


Public bug reported:

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'

** Affects: debian-installer (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debian-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1745696

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

Status in debian-installer package in Ubuntu:
  New

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'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1745696/+subscriptions



More information about the foundations-bugs mailing list