fails to install on disk with pre-existing broken partition table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
High
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Attempting to use subiquity to install to a disk that has a pre-existing inconsistent partition table, curtin fails with the following complaint:
labeling device: '/dev/sdc' with 'gpt' partition table
Running command ['sgdisk', '--clear', '/dev/sdc'] with allowed return codes [0] (capture=False)
*******
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
*******
Non-GPT disk; not saving changes. Use -g to override.
An error occured handling 'disk-1': ProcessExecutio
Command: ['sgdisk', '--clear', '/dev/sdc']
Exit code: 3
Reason: -
Stdout: ''
Stderr: ''
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/usr/lib/
ret = args.func(args)
File "/usr/lib/
meta_
File "/usr/lib/
handler(
File "/usr/lib/
util.
File "/usr/lib/
return _subp(*args, **kwargs)
File "/usr/lib/
cmd=args)
curtin.
Command: ['sgdisk', '--clear', '/dev/sdc']
Related branches
- Scott Moser (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 66 lines (+29/-2)3 files modifiedcurtin/commands/block_meta.py (+5/-1)
examples/tests/uefi_basic.yaml (+23/-0)
tests/vmtests/test_uefi_basic.py (+1/-1)
- curtin developers: Pending requested
-
Diff: 1202 lines (+350/-270)36 files modifiedcurtin/block/__init__.py (+11/-5)
curtin/block/clear_holders.py (+33/-4)
curtin/commands/block_meta.py (+23/-20)
curtin/commands/block_wipe.py (+4/-0)
curtin/commands/clear_holders.py (+1/-1)
debian/changelog (+17/-0)
examples/tests/bcache-wipe-xfs.yaml (+74/-0)
examples/tests/uefi_basic.yaml (+23/-0)
tests/unittests/test_clear_holders.py (+82/-0)
tests/unittests/test_commands_block_meta.py (+11/-15)
tests/vmtests/__init__.py (+14/-15)
tests/vmtests/releases.py (+0/-11)
tests/vmtests/test_basic.py (+0/-48)
tests/vmtests/test_bcache_basic.py (+0/-4)
tests/vmtests/test_bcache_bug1718699.py (+21/-0)
tests/vmtests/test_iscsi.py (+0/-4)
tests/vmtests/test_lvm.py (+0/-8)
tests/vmtests/test_lvm_iscsi.py (+0/-4)
tests/vmtests/test_mdadm_iscsi.py (+0/-4)
tests/vmtests/test_network.py (+0/-5)
tests/vmtests/test_network_alias.py (+0/-5)
tests/vmtests/test_network_bonding.py (+0/-8)
tests/vmtests/test_network_enisource.py (+0/-6)
tests/vmtests/test_network_ipv6.py (+0/-5)
tests/vmtests/test_network_ipv6_enisource.py (+0/-7)
tests/vmtests/test_network_ipv6_static.py (+0/-5)
tests/vmtests/test_network_ipv6_vlan.py (+0/-16)
tests/vmtests/test_network_mtu.py (+1/-6)
tests/vmtests/test_network_static.py (+0/-6)
tests/vmtests/test_network_static_routes.py (+0/-6)
tests/vmtests/test_network_vlan.py (+0/-16)
tests/vmtests/test_nvme.py (+0/-5)
tests/vmtests/test_raid5_bcache.py (+0/-5)
tests/vmtests/test_uefi_basic.py (+1/-15)
tools/launch (+10/-10)
tools/xkvm (+24/-1)
Changed in curtin: | |
status: | Confirmed → Fix Committed |
This happens if curtin doesn't get a 'wipe: superblock' and the target device has a non-gpt partition already.
Curtin should use sgdisk --zap-all (which will wipe mbr and gpt) instead of just --clear.