[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GPT name overflow

From: Andreas Dilger
Subject: Re: GPT name overflow
Date: Thu, 31 Jan 2002 13:41:57 -0700
User-agent: Mutt/

On Jan 31, 2002  23:27 +1100, Andrew Clausen wrote:
> On Wed, Jan 30, 2002 at 02:39:30PM -0700, Andreas Dilger wrote:
> > Hmm, maybe a glibc wchar problem?  I'm using glibc 2.1.3-33.  The message
> > appears to be from parted/strlist.c, and I hit it even with a totally
> > different string "trying a new string which is longer", but not the longer
> > "asdf asdf asdf asdf asdf asdf asdf asdf asfd".  Strange.
> What does it actually do?  Seg fault?

No, just the message "Error during translation: Invalid or incomplete
multibyte or wide character" that I appear to get when I try other
non-english LANGs.  The problem is that this happens in the default
(C?) LANG.

> > Well, I was looking at gpt_set_system() and not gpt_set_flags(), so you
> > are correct that it doesn't set the UUID at all.  Semi-tested patch below.
> > It removes the ->lvm, ->raid, ->boot booleans from the GPT-private data
> > and just compares the UUID fields directly.  This is better because you
> > avoid duplication of state, and it will also work for data read from disk.
> > It also adds support to the "swap" type which you didn't handle from
> > "set X swap on" before.
> Unfortunately, it has the wrong semantics (IMHO). (It isn't really
> duplication of state...)
> If the user makes a reiser system (as opposed to an ext2 one
> that was there before, for example), then ped_partition_set_system()
> will be called, with the new fs type.
> If this partition is a boot partition, and you just blindly assign
> "reiser", then you just lost your boot flag.
> Sure, you could check if it was boot beforehand, but I think it's
> cleaner with the flags separate.

OK, as you please, as long as it actually works.

> > On a related note - how can you specify a particular partition type when
> > running mkpart for DOS partitions?
> You can only specify a file system type, which maps onto a subset
> of partition types.
> > It seems parted (and libparted) make
> > this intentionally difficult to do.  What if you wanted to set a particular
> > GUID (unknown to parted) as the partition type for a GPT partition?
> Partition types are The Wrong Thing TM IMHO.  They are always a function
> of something more intuitive/practical (like a boot flag, or lba flag,
> or the file system type), so it's better to provide an interface for
> what the types all mean, rather than display them directly.

Well, my case I need to be able to set an obscure partition ID (Compaq
Diagnostic = 0x12, but it has an MSDOS filesystem on it).  I suppose I
could add this in as a flag.  Would you consider adding this into
parted?  Any ideas on a good flag, "compaq-diag", "diagnostic", other?

> Do you know how to choose the right FAT partition ID?  There are about
> 30 to choose from...

Yes, that's pretty ugly, I agree.

> Anyway, I have no ethical objections to adding an support for
> playing with IDs directly (not that I see this as useful...
> the solution to the unknown GUID type problem is to update parted)

Well, I think the idea behind 16-byte GUID types as opposed to 1-byte
partition types is that people can randomly create new partition types
without worrying about conflicts.  Sadly, they would be far better off
to allow some "name=value" parameters to be stored with each partition
so you can save more than a single bit of information (or require 2^n
different GUIDs to store n bits of flags).

Cheers, Andreas
Andreas Dilger

reply via email to

[Prev in Thread] Current Thread [Next in Thread]