dcantrell / pyparted

Python bindings for GNU parted (libparted)
GNU General Public License v2.0
85 stars 42 forks source link

Unknown partition filesystem #89

Closed leandromqrs closed 1 year ago

leandromqrs commented 2 years ago

When I try to create a partition I get a Unknown filesystem type.

import parted

print('creating primary partition')
device = parted.getDevice('/dev/sda')
print('created %s', device)
disk = parted.freshDisk(device, 'gpt')
print('created %s', disk)
geometry = parted.Geometry(device=device, start=1, length=device.getLength() - 1)

print('created %s', geometry)
filesystem = parted.FileSystem(type='fat32', geometry=geometry)
print('created %s', filesystem)
partition = parted.Partition(disk=disk, type=0, fs=filesystem, geometry=geometry)
print('created %s', partition)
disk.addPartition(partition=partition, constraint=device.optimalAlignedConstraint)
partition.setFlag(parted.PARTITION_BOOT)
disk.commit()
print('created %s', disk)

What is wrong?

dcantrell commented 2 years ago

Updated:

https://pypi.org/project/pyparted/3.12.0/

Thanks,

On Wed, Mar 30, 2022 at 09:01:27PM -0700, Leandro Marques wrote:

Please, I have a issue with 3.11.7 when I create a partition, the partition is created with Unknown type.

Thanks for the work!

-- Reply to this email directly or view it on GitHub: https://github.com/dcantrell/pyparted/issues/89 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

-- David Cantrell @.***> WH6DSN | https://www.burdell.org/

dcantrell commented 1 year ago

Is this still happening or can I close this issue?

leandromqrs commented 1 year ago

No, it's not happening anymore, you can close this issue, thanks!

dcantrell commented 1 year ago

Thank you!