Skip to contentSkip to conversation

RFC: Changing default partition type for linux/ppc

DISCUSSION Benjamin Herrenschmidt 12 participants 18 messages Jul 7, 2000 – Jul 10, 2000

lore
Share & tools
lore
#0 lore raw

Hi all !

Currently, the default partition type used by Linux/PPC on mac partition maps is Apple_UNIX_SVR2. This is historically the type used by Apple's A/ UX for its own partitions. However, I don't like it since it gives no indication on the type of filesystem on the partition, and I see no reason to keep it.

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

If everyone is ok, we can then update pdisk, and on my side, I'll update the kernel's root-auto-detect mecanism to take this into account. (The kernel will currently find by itself a root partition if it has the above type and the name "root" and no root= option was specified by the bootloader).

Any comments ?

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 1 line · Benjamin Herrenschmidt

Hi all !

Greets!

Quoted 3 lines

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

I agree. I think this is a good step. However there's the obvious interoperability problems with MacOS, OS X etc... Hopefully Apple's OSes wouldn't do anything evil to the partition they don't recognize.

Regards,

Tom

Tom Gall - PowerPC Linux Team "Where's the ka-boom? There was
Linux Technology Center supposed to be an earth
(w) [email protected] shattering ka-boom!"
(w) 507-253-4558 -- Marvin Martian
(h) [email protected]
http://oss.software.ibm.com/developerworks/opensource/linux

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 7 lines · Tom Gall
Quoted 1 line · Benjamin Herrenschmidt

Hi all !

Greets!

Quoted 7 lines
Quoted 3 lines

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

I agree. I think this is a good step. However there's the obvious interoperability problems with MacOS, OS X etc... Hopefully Apple's OSes wouldn't do anything evil to the partition they don't recognize.

As someone real important said a couple of weeks ago:
Don't trust them.

You know the slogan of Apple ;)

Gruss Olaf

--

 $ man clone

BUGS
Main feature not yet implemented...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Tom Gall
Quoted 10 lines · Tom Gall
Quoted 4 lines · Benjamin Herrenschmidt

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

I agree. I think this is a good step. However there's the obvious interoperability problems with MacOS, OS X etc... Hopefully Apple's OSes wouldn't do anything evil to the partition they don't recognize.

Well, they don't at this point. For example in partitioning tool in LinuxPPC 2000, LinuxPPC Inc decided it would be better to use the type "Linux_PPC". This works (in that nothing gets overwritten, corrupted, etc) but has the disadvantage that no other software knows anything about that type.

If you were writing software it would be pretty poor form to find data you didn't understand and decide to "fix" it. I know there are programs like that out there (if you look at
http://www.win.tue.nl/~aeb/partitions/partition_types-1.html it seems there is a rich history of them), but Apple seems to be doing well in that regard so far...

Of course, everything may change with OS X but I would hope they don't get malicious all of a sudden.

-Hollis

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#11 lore raw
In reply to Benjamin Herrenschmidt
Quoted 13 lines · Benjamin Herrenschmidt

Hi all !

Currently, the default partition type used by Linux/PPC on mac partition maps is Apple_UNIX_SVR2. This is historically the type used by Apple's A/ UX for its own partitions. However, I don't like it since it gives no indication on the type of filesystem on the partition, and I see no reason to keep it.

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

Quoted 6 lines

If everyone is ok, we can then update pdisk, and on my side, I'll update the kernel's root-auto-detect mecanism to take this into account. (The kernel will currently find by itself a root partition if it has the above type and the name "root" and no root= option was specified by the bootloader).

Any comments ?

Do not forget Prep Machines that have already a specific type of partition that is already recognised by cfdisk...

--
__
/ ` Eric Valette - Canon CRF
/-- __ o _. Canon Development Europe Team Leader
(___, / (_(_(__ Rue de la touche lambert
35517 Cesson-Sevigne Cedex FRANCE
Tel: +33 (0)2 99 87 68 91 Fax: +33 (0)2 99 84 11 30
E-mail: [email protected] http://www.crf.canon.fr

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
In reply to Hollis Blanchard

I think it's a great idea. I don't use MacOS so I don't share the concern of how MacOS X could affect the partitions. Equally, I trust if Apple is properly advised of such a change they would take measures to ensure compatibility. Linux sells Apple hardware too. ;-)

Best Regards,
Charles Stevenson

Quoted 25 lines · Hollis Blanchard
Quoted 10 lines · Tom Gall
Quoted 4 lines · Benjamin Herrenschmidt

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

I agree. I think this is a good step. However there's the obvious interoperability problems with MacOS, OS X etc... Hopefully Apple's OSes wouldn't do anything evil to the partition they don't recognize.

Well, they don't at this point. For example in partitioning tool in LinuxPPC 2000, LinuxPPC Inc decided it would be better to use the type "Linux_PPC". This works (in that nothing gets overwritten, corrupted, etc) but has the disadvantage that no other software knows anything about that type.

If you were writing software it would be pretty poor form to find data you didn't understand and decide to "fix" it. I know there are programs like that out there (if you look at
http://www.win.tue.nl/~aeb/partitions/partition_types-1.html it seems there is a rich history of them), but Apple seems to be doing well in that regard so far...

Quoted 4 lines

Of course, everything may change with OS X but I would hope they don't get malicious all of a sudden.

-Hollis

--
Terra Soft Solutions, Inc.
http://www.terrasoftsolutions.com/

Yellow Dog Linux
"The Ultimate Companion for a Dedicated Server"
http://www.yellowdoglinux.com/

Black Lab Linux
Advanced Workstations, Parallel, and Embedded Solutions
http://www.blacklablinux.com/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
In reply to Hollis Blanchard
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

I agree. I think this is a good step. However there's the obvious interoperability problems with MacOS, OS X etc... Hopefully Apple's OSes wouldn't do anything evil to the partition they don't recognize.

Quoted 5 lines

Well, they don't at this point. For example in partitioning tool in LinuxPPC 2000, LinuxPPC Inc decided it would be better to use the type "Linux_PPC". This works (in that nothing gets overwritten, corrupted, etc) but has the disadvantage that no other software knows anything about that type.

So can we get all distributions to agree on this partition type scheme? IIRC Debian currently relies on the Apple_Unix_SVR2 type, and ignores everything else for the purpose of installing or creating swap space. I'd like to update the Debian version of pdisk to recognize types used by other distributions if possible.
LinuxPPC 1999 used the same type, and I think the 2000 change is a bad thing. What are YellowDog and SuSE using?

Plus I don't think Apple cares too much, they may currently ignore strange partition types but decide to nuke them tomorrow.

Benh: are you maintaining the official version of pdisk now?

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#12 lore raw
In reply to Benjamin Herrenschmidt

That sounds like a great idea. Looking at:
http://developer.apple.com/techpubs/mac/Devices/Devices-126.html

You'll see:
pmParType
A string that identifies the partition type. Names that
begin with Apple_ are reserved for use by Apple Computer, Inc....

It looks to me that this allows us to use any name we wish, as long as it doesn't start with "Apple_"

My vote: let the kernel still look for Apple_UNIX_SVR2 the way it does now. Then I would like it to be able to use anything that starts with "Linux". That way people can name there parts types whatever they want, but Linux_ext2 and Linux_swap should be defaults.

Anyway, thats my suggestions, do what you wish!

Thanks!
--Mark

Quoted 13 lines · Benjamin Herrenschmidt

Hi all !

Currently, the default partition type used by Linux/PPC on mac partition maps is Apple_UNIX_SVR2. This is historically the type used by Apple's A/ UX for its own partitions. However, I don't like it since it gives no indication on the type of filesystem on the partition, and I see no reason to keep it.

So I suggest moving to Linux_ext2, Linux_swap, or maybe simply Linux and Linux_swap (since ext2 is not the only filesystem Linux may put on these). Using a different type for swap would help avoiding confusion.

Quoted 9 lines

If everyone is ok, we can then update pdisk, and on my side, I'll update the kernel's root-auto-detect mecanism to take this into account. (The kernel will currently find by itself a root partition if it has the above type and the name "root" and no root= option was specified by the bootloader).

Any comments ?

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#7 lore raw
In reply to Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt
Quoted 2 lines

Benh: are you maintaining the official version of pdisk now?

No, I'm not. I don't know if someone actually maintains it

I believe one of the original (the original?) creator(s) of pdisk is now part of the Linux/PPC community. IIRC, he was working on upgrading pdisk and fixing the problems that were highlighted previously in the list archives. I haven't heard anything recently, so I have no idea what the status is.

--Nelson Abramson

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#13 lore raw
In reply to Mark Hatle
Quoted 7 lines

with "Apple_"

My vote: let the kernel still look for Apple_UNIX_SVR2 the way it does now. Then I would like it to be able to use anything that starts with "Linux". That way people can name there parts types whatever they want, but Linux_ext2 and Linux_swap should be defaults.

The kernel will be able to use anything. The only kernel change concerns the root auto-detect stuff.

What will need to change, however, are the various distro installers, pdisk, yaboot, perhaps quik, ...

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#8 lore raw
In reply to Michael Schmitz
Quoted 6 lines · Michael Schmitz

So can we get all distributions to agree on this partition type scheme? IIRC Debian currently relies on the Apple_Unix_SVR2 type, and ignores everything else for the purpose of installing or creating swap space. I'd like to update the Debian version of pdisk to recognize types used by other distributions if possible.

this would certainly have to wait for woody...

Signature · 2 lines
Ethan Benson
http://www.alaska.net/~erbenson/
#10 lore raw
In reply to Michael Schmitz
Quoted 9 lines · Michael Schmitz
Quoted 7 lines

Well, they don't at this point. For example in partitioning tool in LinuxPPC 2000, LinuxPPC Inc decided it would be better to use the type "Linux_PPC". This works (in that nothing gets overwritten, corrupted, etc) but has the disadvantage that no other software knows anything about that type.

So can we get all distributions to agree on this partition type scheme?

[snip]

Quoted 2 lines

LinuxPPC 1999 used the same type, and I think the 2000 change is a bad thing. What are YellowDog and SuSE using?

I agree. So far the Linux "standard" has been to pretend to be A/UX partitions. To my knowledge, every distribution with the exception of LinuxPPC 2000 uses Apple_UNIX_SVR2. (And I'm not sure that alteration was especially well thought out.)

Quoted 1 line

Benh: are you maintaining the official version of pdisk now?

That would be Eryk Vershen <[email protected]>, who recently resurfaced in February
(http://lists.linuxppc.org/listarcs/linuxppc-user/200002/msg01471.html).

So now that the conversation's died down, it seems like everybody's happy with "Linux" (Mark Hatle's suggestion was for "Linux_*") and "Linux_swap".

-Hollis

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#14 lore raw
In reply to Benjamin Herrenschmidt
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 4 lines

My vote: let the kernel still look for Apple_UNIX_SVR2 the way it does now. Then I would like it to be able to use anything that starts with "Linux". That way people can name there parts types whatever they want, but Linux_ext2 and Linux_swap should be defaults.

The kernel will be able to use anything. The only kernel change concerns the root auto-detect stuff.

What will need to change, however, are the various distro installers, pdisk, yaboot, perhaps quik, ...

i'd vote for "ext2", "hfs", etc. call them what they are, and keep it simple, instead of "Linux_Ext2fs" or something similar.

imho, partition types should be a "soft" standard. eg, an installer should default to only showing Apple_UNIX_SVR2 (or whatever standard partition names are created) unless the user selects "show all" or similar option. this is somewhat offtopic, though.

--
Tom Vier <[email protected]>
DSA Key id 0x27371A2C

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#15 lore raw
Quoted 3 lines

i'd vote for "ext2", "hfs", etc. call them what they are, and keep it simple, instead of "Linux_Ext2fs" or something similar.

That won't work for 2 reasons:

- MacOS and MacOS X won't mount HFS partitions if the type is not Apple_HFS
- If we put the fs type (like Linux_ext2) in the partition type, it's
not updated
by the various linux mkxxxx tools, and can be confusing. I would
rather keep
a simple "Linux" type, along with "Linux_swap" to help skipping swap
partition
in bootloaders (and installers)

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#16 lore raw
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 2 lines

i'd vote for "ext2", "hfs", etc. call them what they are, and keep it simple, instead of "Linux_Ext2fs" or something similar.

That won't work for 2 reasons:

- MacOS and MacOS X won't mount HFS partitions if the type is not Apple_HFS

you're right. i was just giving examples of names and hfs popped into my head.

Quoted 7 lines

- If we put the fs type (like Linux_ext2) in the partition type, it's
not updated
by the various linux mkxxxx tools, and can be confusing. I would
rather keep
a simple "Linux" type, along with "Linux_swap" to help skipping swap
partition
in bootloaders (and installers)

i'm not sure what you're saying. mkfs doesn't touch partition tables.

i was thinking of partition types as more of a description of the fs, rather than naming them after the OS that uses them. on pcs, linux uses the same partition type for all file systems (except for swap). it wouldn't be a bad idea to do the same, as you seem to be saying. "Linux_swap" as a type does seem a little redundant to me, since the partition name can be set to "swap". on pc/dos style partitions they use a seperate type for for swap, but they also don't have a seperate name field.

--
Tom Vier <[email protected]>
DSA Key id 0x27371A2C

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#17 lore raw
Quoted 6 lines · Tom Vier
Quoted 4 lines

If we put the fs type (like Linux_ext2) in the partition type, it's not updated by the various linux mkxxxx tools, and can be confusing. I would rather keep a simple "Linux" type, along with "Linux_swap" to help skipping swap partition in bootloaders (and installers)

i'm not sure what you're saying. mkfs doesn't touch partition tables.

That's the problem. If we create a partition with the label "ext2" and later use mkfs to change the filesystem on that partition, the label stays and is misleading.

Because people don't always change their partition tables when they switch filesystems or operating systems, any label is liable to become inconsistant with the actual disk state. Therefore, these type labels should be used only as hints to bootloaders and installers and such; there should always be a way to ignore them.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#9 lore raw
In reply to Ethan Benson
Quoted 8 lines
Quoted 6 lines

So can we get all distributions to agree on this partition type scheme? IIRC Debian currently relies on the Apple_Unix_SVR2 type, and ignores everything else for the purpose of installing or creating swap space. I'd like to update the Debian version of pdisk to recognize types used by other distributions if possible.

this would certainly have to wait for woody...

Sure, but isn't woody right around the corner ?? :-)

Just wanted to make sure we get some sort of agreement.

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/