[parted-devel] libparted and partition system id
    Petr Uzel 
    petr.uzel at suse.cz
       
    Mon Jun 27 11:01:09 UTC 2011
    
    
  
On Sat, Jun 25, 2011 at 11:08:44PM -0700, ben wrote:
> Using libparted is there a way to set the system ID of the partition, for 
> instance 0x83 for linux,  without using libparted to actualy write a filesystem 
> to the partition?
As far as I know, this is not possible with vanilla parted. However,
you finally forced me to post here our SUSE patch that 'abuses'
partition flags in (lib)parted for setting partition types. Attaching
version that applies to parted-2.4.
------
# parted -s /dev/sdb set 1 type 0x83
# parted -s /dev/sdb print
Model: Linux scsi_debug (scsi)
Disk /dev/sdb: 8389kB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  5014kB  4981kB  primary               type=83
------
Jim, if I clean (at least the testsuite has to be adapted) the patch,
would you be willing to accept it?
Thanks,
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parted-type.patch
Type: text/x-patch
Size: 5586 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20110627/3e28ed47/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20110627/3e28ed47/attachment.pgp>
    
    
More information about the parted-devel
mailing list