← Back to team overview

curtin-dev team mailing list archive

[Bug 1875903] Re: Curtin fails if a partition with bootable flag is present

 

This bug is believed to be fixed in curtin in version 20.1. If this is
still a problem for you, please make a comment and set the state back to
New

Thank you.

** Changed in: curtin
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of curtin
developers, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/1875903

Title:
  Curtin fails if a partition with bootable flag is present

Status in curtin:
  Fix Released

Bug description:
  I became aware of this problem by reading this forum post: https://www
  .vdr-portal.de/forum/index.php?thread/133200-yavdr-experimental-f%C3
  %BCr-ubuntu-20-04-yavdr-ansible-focal/&postID=1325428#post1325428 so I
  am not able to do an explicit debug run.

  curtain parses the output of a subprocess call like "sfdisk --dump
  /dev/sdb", which can look like this:

  label: dos
  label-id: 0x0007ca9c
  device: /dev/sdb
  unit: sectors
  /dev/sdb1 : start=        2048, size=    29294592, type=83, bootable
  /dev/sdb2 : start=    29296640, size=    28682240, type=83
  /dev/sdb3 : start=    57985022, size=  2872291330, type=5
  /dev/sdb5 : start=  2927134720, size=     3141632, type=82
  /dev/sdb6 : start=    57985024, size=    29294592, type=83
  /dev/sdb7 : start=    87281664, size=  2839851008, type=83

  The method _sfdisk_parse_lines(lines)
  (https://github.com/canonical/curtin/blob/master/curtin/block/__init__.py#L251
  ff.) expects key-value pairs in the style key=value, which isn't the
  case for any partition flags.

  As a side node: The output of sfdisk for gpt-formatted disks can
  contain partition names, so splitting the right hand side string of
  the colon by ','
  (https://github.com/canonical/curtin/blob/master/curtin/block/__init__.py#L259
  ff.) without proper parsing of quotes (e.g. using shlex.split()
  https://docs.python.org/3/library/shlex.html) could cause additional
  issues if the partition name contains one or more commata.

To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1875903/+subscriptions


References