Petr Uzel wrote: > On Mon, Jun 27, 2011 at 11:07:52PM +0200, Jim Meyering wrote: >> 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. >> > >> > >> > 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". > > Hi Jim, Karel and all, > > You are right - it should be possible to at least set partition type > for GPT and msdos (and maybe others - Karel mentioned mac). > > For GPT, I also agree that it should be possible to specify both full > UUID as well as shortcuts for some of the most commonly used values. > > As for printing the type - do you think that extending 'parted print' > with type information is sufficient or would you prefer some other > way (command) of printing it? IMHO 'parted print' is fine.
Printing more information via the "print" sub-command would be nice, but would cause trouble for any program that parses that output. One possibility would be to output the additional information only when some new command-line option is specified. Another possibility, which I prefer, is to add a new command to print a table with this new per-partition data. Later we may want to print (and even set) disk and partition "unique UUIDs" (aka GUIDs), too. > And yes, using flags does not seem like a best idea, even if it worked > :) For setting the partition type, I can imagine new command, 'parted > type' which would call partition-table-type specific function to query > the user and then set the type. > > I'd like to work on this (as well as on FS-agnostic move and resize > commands we discussed recently). Right now I'm busy with SLES stuff > and will have vacation soon (no computers!! :) ), but I won't forget > this. _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/parted-devel

