Petr Uzel wrote: > 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?
Hi Petr, This looks useful. However, shouldn't any type-setting scheme try to be useful with GPT partitions in addition to MSDOS ones? I'd be happy to be able to set the types of only those two partition table types, for now. Of course, just *how* to specify a GPT partition type is not as clear cut as it is for MSDOS. Do you want to always require a full UUID? Short-cuts for common values? Once you provide interfaces to set these things, it's only logical to expect an interface to get/print the values. When thinking about setting and especially printing arbitrary GPT partition type UUIDs, I begin to think it'd be best not to try to shoe-horn this functionality into the "flags". _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/parted-devel

