curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #00386
[Bug 1879065] [NEW] subiquity msdos partition error: Verifying partition flag, expecting linux, found None
Public bug reported:
VERSIONS
ubuntu-20.04-live-server
subiquity 5.0.2 (1874)
PROBLEM
Ubuntu server installer fails when reusign a custom msdos partition layout, with error:
"Verifying /dev/sda1 partition flag, expecting linux, found None"
Layout:
$ sfdisk --dump /dev/sda
label: dos
label-id: 0x7eb07f8d
device: /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 1048576, type=83
/dev/sda2 : start= 1050624, size= 30226432, type=8e
$ pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 ubuntu lvm2 a-- 14.41g 1.41g
$ vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu 1 2 0 wz--n- 14.41g 1.41g
$ lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu -wi-ao---- 12.00g
swap ubuntu -wi-ao---- 1.00g
Chosen options:
/dev/sda1 format ext4, mount /boot
/dev/ubuntu/root format ext4, mount /
/dev/ubuntu/swap format swap
WORKAROUND
patch sub verify_ptable_flag in root/curtin/commands/block_meta.py
@@ -755,6 +755,8 @@
if (sfdisk_info['label'] in ('dos', 'msdos')):
if expected_flag == 'boot':
found_flag = 'boot' if entry.get('bootable') is True else None
+ if expected_flag == 'linux':
+ found_flag = 'linux'
elif expected_flag == 'extended':
(found_flag, _code) = ptable_uuid_to_flag_entry(entry['type'])
elif expected_flag == 'logical':
ERROR TRACE
Running command ['sfdisk', '--json', '/dev/sda'] with allowed return codes [0] (capture=True)
Verifying /dev/sda1 size, expecting 536870912 bytes, found 536870912 bytes
Device /dev/sda1 ptable entry: {
"node": "/dev/sda1",
"size": 1048576,
"start": 2048,
"type": "83"
}
Verifying /dev/sda1 partition flag, expecting linux, found None
An error occured handling 'partition-sda1': RuntimeError - Verifying /dev/sda1 partition flag, expecting linux, found None
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring partition: partition-sda1
TIMED BLOCK_META: 3.765
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
Traceback (most recent call last):
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/main.py", line 202, in main
ret = args.func(args)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/log.py", line 97, in wrapper
return log_time("TIMED %s: " % msg, func, *args, **kwargs)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/log.py", line 79, in log_time
return func(*args, **kwargs)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 111, in block_meta
return meta_custom(args)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 1909, in meta_custom
handler(command, storage_config_dict)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 878, in partition_handler
partition_verify(part_path, info)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 782, in partition_verify
verify_ptable_flag(devpath, info['flag'], sfdisk_info=sfdisk_info)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 770, in verify_ptable_flag
raise RuntimeError(msg)
RuntimeError: Verifying /dev/sda1 partition flag, expecting linux, found None
Verifying /dev/sda1 partition flag, expecting linux, found None
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
** Affects: curtin
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of curtin
developers, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/1879065
Title:
subiquity msdos partition error: Verifying partition flag, expecting
linux, found None
Status in curtin:
New
Bug description:
VERSIONS
ubuntu-20.04-live-server
subiquity 5.0.2 (1874)
PROBLEM
Ubuntu server installer fails when reusign a custom msdos partition layout, with error:
"Verifying /dev/sda1 partition flag, expecting linux, found None"
Layout:
$ sfdisk --dump /dev/sda
label: dos
label-id: 0x7eb07f8d
device: /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 1048576, type=83
/dev/sda2 : start= 1050624, size= 30226432, type=8e
$ pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 ubuntu lvm2 a-- 14.41g 1.41g
$ vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu 1 2 0 wz--n- 14.41g 1.41g
$ lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu -wi-ao---- 12.00g
swap ubuntu -wi-ao---- 1.00g
Chosen options:
/dev/sda1 format ext4, mount /boot
/dev/ubuntu/root format ext4, mount /
/dev/ubuntu/swap format swap
WORKAROUND
patch sub verify_ptable_flag in root/curtin/commands/block_meta.py
@@ -755,6 +755,8 @@
if (sfdisk_info['label'] in ('dos', 'msdos')):
if expected_flag == 'boot':
found_flag = 'boot' if entry.get('bootable') is True else None
+ if expected_flag == 'linux':
+ found_flag = 'linux'
elif expected_flag == 'extended':
(found_flag, _code) = ptable_uuid_to_flag_entry(entry['type'])
elif expected_flag == 'logical':
ERROR TRACE
Running command ['sfdisk', '--json', '/dev/sda'] with allowed return codes [0] (capture=True)
Verifying /dev/sda1 size, expecting 536870912 bytes, found 536870912 bytes
Device /dev/sda1 ptable entry: {
"node": "/dev/sda1",
"size": 1048576,
"start": 2048,
"type": "83"
}
Verifying /dev/sda1 partition flag, expecting linux, found None
An error occured handling 'partition-sda1': RuntimeError - Verifying /dev/sda1 partition flag, expecting linux, found None
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring partition: partition-sda1
TIMED BLOCK_META: 3.765
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
Traceback (most recent call last):
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/main.py", line 202, in main
ret = args.func(args)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/log.py", line 97, in wrapper
return log_time("TIMED %s: " % msg, func, *args, **kwargs)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/log.py", line 79, in log_time
return func(*args, **kwargs)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 111, in block_meta
return meta_custom(args)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 1909, in meta_custom
handler(command, storage_config_dict)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 878, in partition_handler
partition_verify(part_path, info)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 782, in partition_verify
verify_ptable_flag(devpath, info['flag'], sfdisk_info=sfdisk_info)
File "/snap/subiquity/1874/lib/python3.6/site-packages/curtin/commands/block_meta.py", line 770, in verify_ptable_flag
raise RuntimeError(msg)
RuntimeError: Verifying /dev/sda1 partition flag, expecting linux, found None
Verifying /dev/sda1 partition flag, expecting linux, found None
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1879065/+subscriptions