Curtin fails if a partition with bootable flag is present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
High
|
Unassigned |
Bug Description
I became aware of this problem by reading this forum post: https:/
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_
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:/
Related branches
- Server Team CI bot: Needs Fixing (continuous-integration)
- Chad Smith: Approve
-
Diff: 10726 lines (+6948/-918)83 files modifiedMakefile (+15/-6)
curtin/__init__.py (+2/-0)
curtin/block/__init__.py (+190/-12)
curtin/block/bcache.py (+242/-1)
curtin/block/clear_holders.py (+34/-51)
curtin/block/lvm.py (+43/-6)
curtin/block/mdadm.py (+10/-25)
curtin/block/mkfs.py (+8/-2)
curtin/block/multipath.py (+90/-11)
curtin/block/schemas.py (+13/-2)
curtin/commands/apt_config.py (+1/-5)
curtin/commands/block_discover.py (+11/-2)
curtin/commands/block_meta.py (+597/-474)
curtin/commands/clear_holders.py (+44/-9)
curtin/commands/curthooks.py (+225/-38)
curtin/distro.py (+18/-1)
curtin/storage_config.py (+64/-36)
curtin/udev.py (+25/-2)
curtin/util.py (+13/-2)
debian/changelog (+58/-0)
dev/null (+0/-6)
doc/topics/storage.rst (+108/-19)
examples/tests/bcache-ceph-nvme-simple.yaml (+2/-2)
examples/tests/bcache-ceph-nvme.yaml (+2/-2)
examples/tests/filesystem_battery.yaml (+1/-0)
examples/tests/mirrorboot-uefi.yaml (+17/-1)
examples/tests/multipath-lvm-part-wipe.yaml (+125/-0)
examples/tests/multipath-lvm.yaml (+121/-0)
examples/tests/multipath.yaml (+6/-0)
examples/tests/preserve-bcache.yaml (+82/-0)
examples/tests/preserve-lvm.yaml (+77/-0)
examples/tests/preserve-partition-wipe-vg-simple.yaml (+62/-0)
examples/tests/preserve-partition-wipe-vg.yaml (+116/-0)
examples/tests/preserve-raid.yaml (+4/-2)
examples/tests/reuse-lvm-member-partition.yaml (+94/-0)
examples/tests/reuse-msdos-partitions.yaml (+77/-0)
examples/tests/reuse-raid-member-wipe-partition.yaml (+2/-0)
examples/tests/reuse-raid-member-wipe.yaml (+2/-1)
examples/tests/uefi_reuse_esp.yaml (+4/-2)
examples/tests/vmtest_defaults.yaml (+19/-1)
helpers/common (+11/-5)
tests/data/probert_storage_bogus_wwn.json (+1258/-0)
tests/data/probert_storage_nvme_multipath.json (+310/-0)
tests/data/udevadm_info_sandisk_cruzer.txt (+54/-0)
tests/unittests/helpers.py (+52/-3)
tests/unittests/test_apt_custom_sources_list.py (+2/-0)
tests/unittests/test_apt_source.py (+2/-0)
tests/unittests/test_block.py (+104/-5)
tests/unittests/test_block_lvm.py (+31/-1)
tests/unittests/test_block_mdadm.py (+8/-6)
tests/unittests/test_block_mkfs.py (+9/-0)
tests/unittests/test_block_multipath.py (+45/-0)
tests/unittests/test_block_zfs.py (+24/-20)
tests/unittests/test_clear_holders.py (+51/-37)
tests/unittests/test_commands_block_meta.py (+885/-7)
tests/unittests/test_commands_clear_holders.py (+24/-0)
tests/unittests/test_commands_collect_logs.py (+2/-0)
tests/unittests/test_curthooks.py (+483/-8)
tests/unittests/test_distro.py (+51/-2)
tests/unittests/test_gpg.py (+50/-44)
tests/unittests/test_make_dname.py (+3/-3)
tests/unittests/test_storage_config.py (+189/-3)
tests/unittests/test_udev.py (+43/-6)
tests/unittests/test_util.py (+25/-2)
tests/vmtests/__init__.py (+53/-17)
tests/vmtests/releases.py (+20/-3)
tests/vmtests/test_basic.py (+33/-19)
tests/vmtests/test_fs_battery.py (+7/-0)
tests/vmtests/test_mdadm_bcache.py (+34/-0)
tests/vmtests/test_multipath.py (+80/-3)
tests/vmtests/test_multipath_lvm.py (+76/-0)
tests/vmtests/test_preserve_bcache.py (+67/-0)
tests/vmtests/test_preserve_lvm.py (+80/-0)
tests/vmtests/test_preserve_partition_wipe_vg.py (+59/-0)
tests/vmtests/test_reuse_lvm_member.py (+34/-0)
tests/vmtests/test_reuse_msdos_partitions.py (+31/-0)
tests/vmtests/test_reuse_raid_member.py (+1/-1)
tests/vmtests/test_ubuntu_core.py (+9/-0)
tools/block-discover-to-config (+1/-1)
tools/schema-validate-storage (+1/-0)
tools/vmtest-filter (+2/-1)
tools/vmtest-sync-images (+1/-0)
tox.ini (+19/-0)
Thanks for filing the bug and including the sfdisk table.