PARTNAME with accents and other characters outside ASCII range make curtin and probert and storage runs fail

Bug #2017862 reported by Olivier Gayot
86
This bug affects 7 people
Affects Status Importance Assigned to Milestone
subiquity
Fix Released
Undecided
Olivier Gayot

Bug Description

When accents or other special characters are present in a GPT PartitionName (aka. PARTNAME or partlabel), probert storage runs fail with the following exception:

[...]
  File "/snap/ubuntu-desktop-installer/939/lib/python3.10/site-packages/probert/storage.py", line 221, in probe
    result = probe.pfunc(context=self.context, enabled_probes=to_probe)
  File "/snap/ubuntu-desktop-installer/939/lib/python3.10/site-packages/probert/storage.py", line 141, in blockdev_probe
    blockdev[device['DEVNAME']] = dict(device)
  File "/snap/ubuntu-desktop-installer/939/usr/lib/python3/dist-packages/pyudev/device/_device.py", line 945, in __getitem__
    return self.properties.__getitem__(prop)
  File "/snap/ubuntu-desktop-installer/939/usr/lib/python3/dist-packages/pyudev/device/_device.py", line 1068, in __getitem__
    return ensure_unicode_string(value)
  File "/snap/ubuntu-desktop-installer/939/usr/lib/python3/dist-packages/pyudev/_util.py", line 64, in ensure_unicode_string
    value = value.decode(sys.getfilesystemencoding())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 0: invalid continuation byte

I've opened an issue in pyudev upstream with steps to reproduce and a potential change to implement: https://github.com/pyudev/pyudev/issues/490

[Workaround]
* Use fdisk (or similar tool) to remove the accents and special characters from the partition names of all visible block devices. If using fdisk, you need to enter "expert" mode by pressing 'x', edit the name by pressing 'n' and return to main menu by pressing 'r'. It is recommended to backup the partition table before editing the name.

Related branches

Olivier Gayot (ogayot)
description: updated
Olivier Gayot (ogayot)
description: updated
Changed in subiquity:
status: New → In Progress
assignee: nobody → Olivier Gayot (ogayot)
Revision history for this message
Olivier Gayot (ogayot) wrote :
Olivier Gayot (ogayot)
summary: PARTNAME with accents and other characters outside ASCII range make
- probert storage runs fail
+ curtin and probert and storage runs fail
Olivier Gayot (ogayot)
Changed in subiquity:
status: In Progress → Fix Committed
Olivier Gayot (ogayot)
Changed in subiquity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.