Re: Partition IDs in the New World TM

2001-01-24 Thread Andrew Clausen

Glenn McGrath wrote:
> 
> Andrew Clausen wrote:
> >
> > Bryan Henderson wrote:
> > > Incidentally, I just realized that the common name "partition ID"
> > > for this value is quite a misnomer.  As far as I know, it has
> > > never identified the partition, but rather described its contents.
> >
> > Yes, "partition type ID" is better.
> >
> 
> Why not call it filesystem id, thats what its usually describing

Not true.  It may be describing LVM, RAID, or
save-ram-to-disk-for-fast-restart

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-24 Thread Andries . Brouwer

Andreas Dilger wrote:

> It would already be possible to auto-enable any devices with the swap
> signature by doing the same sort of search mount(8) is doing for LABEL
> and UUID.

That would be a very poor idea.
Since different filesystems have signatures in different places,
a partition may well have signatures for several filesystem types.
Similarly, many filesystems leave the first sector alone -
there may be some boot loader there - so if such a filesystem
was created on what used to be a swap partition, also the swap
signature will still be there.

More generally it is a bad idea to start a guessing game.
That leads to systems that usually work, instead of systems that work.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-24 Thread Andreas Dilger

Matt Robinson writes:
> Andreas Dilger wrote:
> > What would be wrong with changing the kernel to skip the first page of
> > swap, and allowing us to put a signature there?  This would be really
> > useful for systems that mount ext2 filesystems by LABEL or UUID.  With
> > the exception of swap, you currently don't need to care about what disk
> > a filesystem is on.  Of course, LVM also fixes this, but not everyone
> > runs LVM.
> 
> LKCD starts writing a crash dump after the first page of the swap
> partition (if that is used as the dump partition), so I'd hate to see
> this implemented.

I don't see how this applies...  Now that I've been educated about how
swap is set up, I see swap already uses the first page for config info
and a signature.  Adding some sort of label or ID to the swap info
wouldn't affect swapping or LKCD in any way because it still wouldn't
go past the first page.

It would already be possible to auto-enable any devices with the swap
signature by doing the same sort of search mount(8) is doing for LABEL
and UUID.  The only drawback would be that you can't specify priority
and usage order, and you can't auto-detect swap files.  Swap files are
not an issue because you can use the file name to locate them.

Cheers, Andreas 
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/   -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-24 Thread Andries . Brouwer

Andreas Dilger wrote:

 It would already be possible to auto-enable any devices with the swap
 signature by doing the same sort of search mount(8) is doing for LABEL
 and UUID.

That would be a very poor idea.
Since different filesystems have signatures in different places,
a partition may well have signatures for several filesystem types.
Similarly, many filesystems leave the first sector alone -
there may be some boot loader there - so if such a filesystem
was created on what used to be a swap partition, also the swap
signature will still be there.

More generally it is a bad idea to start a guessing game.
That leads to systems that usually work, instead of systems that work.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-24 Thread Andrew Clausen

Glenn McGrath wrote:
 
 Andrew Clausen wrote:
 
  Bryan Henderson wrote:
   Incidentally, I just realized that the common name "partition ID"
   for this value is quite a misnomer.  As far as I know, it has
   never identified the partition, but rather described its contents.
 
  Yes, "partition type ID" is better.
 
 
 Why not call it filesystem id, thats what its usually describing

Not true.  It may be describing LVM, RAID, or
save-ram-to-disk-for-fast-restart

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Glenn McGrath

Andrew Clausen wrote:
> 
> Bryan Henderson wrote:
> > Incidentally, I just realized that the common name "partition ID"
> > for this value is quite a misnomer.  As far as I know, it has
> > never identified the partition, but rather described its contents.
> 
> Yes, "partition type ID" is better.
> 

Why not call it filesystem id, thats what its usually describing

Glenn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Matt D. Robinson

Andreas Dilger wrote:
> 
> H. Peter Anvin writes:
> > We have:
> >
> >0x82 - Linux swap
> >0x83 - Linux filesystem
> >0x85 - Linux extended partition (yes, this one does matter!)
> >
> > There seems to be some value in having a different value for swap.  It
> > lets an automatic program find a partition that does not contain data.
> 
> What would be wrong with changing the kernel to skip the first page of
> swap, and allowing us to put a signature there?  This would be really
> useful for systems that mount ext2 filesystems by LABEL or UUID.  With
> the exception of swap, you currently don't need to care about what disk
> a filesystem is on.  Of course, LVM also fixes this, but not everyone
> runs LVM.

LKCD starts writing a crash dump after the first page of the swap
partition (if that is used as the dump partition), so I'd hate to see
this implemented.

--Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Andrew Clausen

Bryan Henderson wrote:
> Allow me to reword to what you probably meant:  Have a partition
> ID that means "generic partition - check signatures within for
> details."  (And then get people who develop file systems for use
> with Linux, at least, to have a policy of always using that).

OK.

> Incidentally, I just realized that the common name "partition ID"
> for this value is quite a misnomer.  As far as I know, it has
> never identified the partition, but rather described its contents.

Yes, "partition type ID" is better.

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Andrew Clausen

Bryan Henderson wrote:
> If you're going to complain about the way partition IDs are assigned,
> a valid complaint would be that "83" is defined as "Linux," instead
> of as something that actually indicates the kind of filesystem on the
> partition.

OK.  s/Linux/Well behaved operationing systems that look for
file system signatures, rather than relying on stupid Partition IDs/

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Andries . Brouwer

Andreas Dilger writes:

: What would be wrong with changing the kernel to skip the first page
: of swap, and allowing us to put a signature there?

Swap space already has a signature. Read mkswap(8).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Andries . Brouwer

Andreas Dilger writes:

: What would be wrong with changing the kernel to skip the first page
: of swap, and allowing us to put a signature there?

Swap space already has a signature. Read mkswap(8).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Matt D. Robinson

Andreas Dilger wrote:
 
 H. Peter Anvin writes:
  We have:
 
 0x82 - Linux swap
 0x83 - Linux filesystem
 0x85 - Linux extended partition (yes, this one does matter!)
 
  There seems to be some value in having a different value for swap.  It
  lets an automatic program find a partition that does not contain data.
 
 What would be wrong with changing the kernel to skip the first page of
 swap, and allowing us to put a signature there?  This would be really
 useful for systems that mount ext2 filesystems by LABEL or UUID.  With
 the exception of swap, you currently don't need to care about what disk
 a filesystem is on.  Of course, LVM also fixes this, but not everyone
 runs LVM.

LKCD starts writing a crash dump after the first page of the swap
partition (if that is used as the dump partition), so I'd hate to see
this implemented.

--Matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Andrew Clausen

Bryan Henderson wrote:
 Allow me to reword to what you probably meant:  Have a partition
 ID that means "generic partition - check signatures within for
 details."  (And then get people who develop file systems for use
 with Linux, at least, to have a policy of always using that).

OK.

 Incidentally, I just realized that the common name "partition ID"
 for this value is quite a misnomer.  As far as I know, it has
 never identified the partition, but rather described its contents.

Yes, "partition type ID" is better.

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-23 Thread Glenn McGrath

Andrew Clausen wrote:
 
 Bryan Henderson wrote:
  Incidentally, I just realized that the common name "partition ID"
  for this value is quite a misnomer.  As far as I know, it has
  never identified the partition, but rather described its contents.
 
 Yes, "partition type ID" is better.
 

Why not call it filesystem id, thats what its usually describing

Glenn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread H. Peter Anvin

Andreas Dilger wrote:
> 
> H. Peter Anvin writes:
> > We have:
> >
> >0x82 - Linux swap
> >0x83 - Linux filesystem
> >0x85 - Linux extended partition (yes, this one does matter!)
> >
> > There seems to be some value in having a different value for swap.  It
> > lets an automatic program find a partition that does not contain data.
> 
> What would be wrong with changing the kernel to skip the first page of
> swap, and allowing us to put a signature there?  This would be really
> useful for systems that mount ext2 filesystems by LABEL or UUID.  With
> the exception of swap, you currently don't need to care about what disk
> a filesystem is on.  Of course, LVM also fixes this, but not everyone
> runs LVM.
> 

It already does that, you know.  Nothing inherently wrong, *EXCEPT* that
it breaks a bunch of programs already out there.

-hpa

-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andreas Dilger

H. Peter Anvin writes:
> We have:
> 
>0x82 - Linux swap
>0x83 - Linux filesystem
>0x85 - Linux extended partition (yes, this one does matter!)
> 
> There seems to be some value in having a different value for swap.  It
> lets an automatic program find a partition that does not contain data.

What would be wrong with changing the kernel to skip the first page of
swap, and allowing us to put a signature there?  This would be really
useful for systems that mount ext2 filesystems by LABEL or UUID.  With
the exception of swap, you currently don't need to care about what disk
a filesystem is on.  Of course, LVM also fixes this, but not everyone
runs LVM.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/   -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread H. Peter Anvin

Followup to:  <[EMAIL PROTECTED]>
By author:Andrew Clausen <[EMAIL PROTECTED]>
In newsgroup: linux.dev.kernel
> 
> > Apart from
> > that, the kernel couldn't care.  You could set all your Ext2 partitions
> > as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
> > changed.
> 
> Exactly.  So, for new disk labels, or whatever, we should recommend to
> the relevant hackers that we have exactly one number for Linux.  Or
> what?
> 

We have:

   0x82 - Linux swap
   0x83 - Linux filesystem
   0x85 - Linux extended partition (yes, this one does matter!)

0x81 isn't Linux, but rather a Minix partition ID.

There seems to be some value in having a different value for swap.  It
lets an automatic program find a partition that does not contain data.

-hpa

-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Jason Venner


The bios on my laptop will only enable the suspend to disk function,
if there is a partion on the disk that is 'IBM Thinkpad hibernation'
(and it is a primary partition).

So, linux may not care but lots of other things that users rely on do
care.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Russell King wrote:
> 
> Andrew Clausen writes:
> > Why is this necessary?  Can't the RAID drivers probe the device for
> > signatures, the same way file systems do?
> 
> One possible problem I can see here is to do with removal of RAID.  Think
> of a RAID-1 array (2 or more disks containing identical data).  The
> partition can be validly identified as an ext2 filesystem.  But wait, it
> has a RAID superblock at the end.
> 
> How do we know if this superblock is current or not?  After all, a mke2fs
> on the device won't remove it.  Yes, you could fill the partition with
> zeros and start again, or you could just change the partition ID.

Yeah, this is a big problem.

Parted solves it, by defining a clobber() operation for each file system
type (which can/should be extended to RAID, if/when we get around to
supporting it properly).  clobber() removes all signatures.

So, I guess the short answer is: mke2fs should remove the RAID super.
For those of you who don't like all-in-one libraries like libparted -
not mentioning any Christo^Wnames - you could probably have
clobber.ext2,
etc.

However, you would want to have a comprehensive set of clobber.*.
Fortunately, clobber.X is going to be very small, so this should be
a problem.

So, the alternative is to define a RAID partition "data" type.  (And
forget about IDs for file systems)

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Glenn McGrath

Andrew Clausen wrote:
> 
> Hi all,
> 
> We have roughly 10 different types of partition tables.  We hate
> them, but it looks like they won't be going away for a long time.
> 
> Partition IDs seem to create a lot of confusion.  For example,
> most people use 0x83 for both ext2 and reiserfs, on msdos
> partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
> Mac, etc.
> 
> Linux doesn't really use partition IDs.  Well, not entirely
> true... it's used on Mac's as a heuristic, for finding swap
> devices, etc. - but I think this unnecessary.
> 
> LVM also uses it, but I also think it's unnecessary.
> 
> So, can anyone remember why we have partition IDs?  (as opposed
> to just probing for signatures on the fs)  If new partition table
> types come out (which is happening, believe it or not...), how
> should Linux/fdisk/parted handle IDs?  Should we have one Linux
> type, that we use for everything?  Should we have one type for each
> TYPE of data (file system, swap, logical volume physical device, etc.)?
> 
> Tchau,
> Andrew Clausen
> 

As far as i know partition ID's are only supposed to say what type of
filesystems is on a partition, which is a totally stupid and crappy idea
that makes no sense whatsoever (i feel strongly about this).

Linux filesystems have a filesystem type field in the filesystems
superblock, which is what mount -a tries to use to guess the filesystem,
the problem is that this flag isnt in the same place, so its not as
valuable as it should be.

Have a partition marker to indicate the filesystem is stupid because the
two are totally independent, of course i can format a filesystem of type
0x82 with whatever filesystem i want, and then there is also sorts of
confusion when the partition table says the wrong thing.

In an ideal world the filesystem superblock flag for any filesystem type
would be easy to get to, and then would also be a partition_table flag
magic bit that indicates the type of partition table (i.e. pc_bios,
solaris, bsd, atari/amiga, LVM) with the absence of the partition_type
flag you could assume it was a whole disk and check my reading the
superblock filesystem.

But of course you could never have an idealistic thing such as this
becuase different people would have to agree on one place for the flags.

Glenn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andries . Brouwer

> does partitioning slow things down?

No.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Mark I Manning IV


On a system with nothing but linux installed does partitioning slow
things down?  

I have...

/dev/hda1 93309 27520 60972  32% /
/dev/hda3   2885812   1042304   1696916  39% /usr
/dev/hda5   4806904   1989612   2573108  44% /home
/dev/hda6   4806904913044   3649676  21% /var
/dev/hda7   4806904   1345696   3217024  30% /home/ftp
/dev/hda8   4806904   2170136   2392584  48%
/home/ftp/debian/dists/potato
/dev/hda9   4806904   1352776   3209944  30%
/home/ftp/debian/dists/woody
/dev/hda10  2284880904832   1263980  42% /home/ftp/debian/pool
/dev/hdb1   3844584721632   2927656  20% /home/shared
/dev/hdb2   3844616  4092   3645224   1% /home/ftp/debian/dists/sid

plus hdb3 not yet mounted anywhere
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Russell King

Andrew Clausen writes:
> Why is this necessary?  Can't the RAID drivers probe the device for
> signatures, the same way file systems do?

One possible problem I can see here is to do with removal of RAID.  Think
of a RAID-1 array (2 or more disks containing identical data).  The
partition can be validly identified as an ext2 filesystem.  But wait, it
has a RAID superblock at the end.

How do we know if this superblock is current or not?  After all, a mke2fs
on the device won't remove it.  Yes, you could fill the partition with
zeros and start again, or you could just change the partition ID.

--
Russell King ([EMAIL PROTECTED])The developer of ARM Linux
 http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andries . Brouwer

Andrew Clausen writes:

> can anyone remember why we have partition IDs?

Partition IDs are not necessary. Linux works fine
when you have no partition table at all, and have a
parttab file in an initrd disk telling the kernel where
the partitions are supposed to be.

No kernel changes required. Today you do not need partition IDs.
Today you can dynamically add and delete partitions,
without involving anything like a partition table.

But people use various schemes to partition their disks,
mainly because also other operating systems like DOS or MacOS
use the same disks. In such a situation it is useful to
agree with the other OS on where the partitions are.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Russell King wrote:
> 
> Andrew Clausen writes:
> > But, for "well behaved operating systems", can't we do it this way?
> > (For the dos partition table scheme, 0x83 could be our "file system
> > type", 0x82 our "swap type", or whatever)
> 
> I think you're complaining about the partition IDs in this thread, and not
> the partition "schemes" that Linux supports.  Am I right?

Well, I don't like either, hehe.  But, partition IDs are the only
thing I'm talking about here (the other was merely drive-by flaming)

> Well, the Linux kernel doesn't really care about partition IDs at all,
> except in one circumstance - to detect auto RAID partitions.

Why is this necessary?  Can't the RAID drivers probe the device for
signatures, the same way file systems do?

(BTW: LVM does this too, and linux-ppc uses partition types as
heuristics
for finding the root device, IIRC, and lots of other boring stuff.  But,
I suspect it isn't needed)

> Apart from
> that, the kernel couldn't care.  You could set all your Ext2 partitions
> as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
> changed.

Exactly.  So, for new disk labels, or whatever, we should recommend to
the relevant hackers that we have exactly one number for Linux.  Or
what?

> About the only user programs that know about partition IDs are:
> - fdisk (its part of the partition table format)
> - installers (to stop users doing stupid things)

Exactly.

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Russell King

Andrew Clausen writes:
> But, for "well behaved operating systems", can't we do it this way?
> (For the dos partition table scheme, 0x83 could be our "file system
> type", 0x82 our "swap type", or whatever)

I think you're complaining about the partition IDs in this thread, and not
the partition "schemes" that Linux supports.  Am I right?

Well, the Linux kernel doesn't really care about partition IDs at all,
except in one circumstance - to detect auto RAID partitions.  Apart from
that, the kernel couldn't care.  You could set all your Ext2 partitions
as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
changed.

About the only user programs that know about partition IDs are:
- fdisk (its part of the partition table format)
- installers (to stop users doing stupid things)

--
Russell King ([EMAIL PROTECTED])The developer of ARM Linux
 http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Brian Gerst wrote:
> For compatability with dual booting other operating systems.  Would you
> want Windows walking over your ext2 filesystems?  Linux didn't invent
> the partition table schemes, it just borrows from those that are most
> common for a given architecture (ie. msdos on PC compatable systems,
> etc.)

Of course, we need to be careful of this kind of stuff.  (That's the
only reason we have partition tables in the first place!)

But, for "well behaved operating systems", can't we do it this way?
(For the dos partition table scheme, 0x83 could be our "file system
type", 0x82 our "swap type", or whatever)

Tchau,
Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Brian Gerst

Andrew Clausen wrote:
> 
> Hi all,
> 
> We have roughly 10 different types of partition tables.  We hate
> them, but it looks like they won't be going away for a long time.
> 
> Partition IDs seem to create a lot of confusion.  For example,
> most people use 0x83 for both ext2 and reiserfs, on msdos
> partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
> Mac, etc.
> 
> Linux doesn't really use partition IDs.  Well, not entirely
> true... it's used on Mac's as a heuristic, for finding swap
> devices, etc. - but I think this unnecessary.
> 
> LVM also uses it, but I also think it's unnecessary.
> 
> So, can anyone remember why we have partition IDs?  (as opposed
> to just probing for signatures on the fs)  If new partition table
> types come out (which is happening, believe it or not...), how
> should Linux/fdisk/parted handle IDs?  Should we have one Linux
> type, that we use for everything?  Should we have one type for each
> TYPE of data (file system, swap, logical volume physical device, etc.)?

For compatability with dual booting other operating systems.  Would you
want Windows walking over your ext2 filesystems?  Linux didn't invent
the partition table schemes, it just borrows from those that are most
common for a given architecture (ie. msdos on PC compatable systems,
etc.)

--

Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Hi all,

We have roughly 10 different types of partition tables.  We hate
them, but it looks like they won't be going away for a long time.

Partition IDs seem to create a lot of confusion.  For example,
most people use 0x83 for both ext2 and reiserfs, on msdos
partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
Mac, etc.

Linux doesn't really use partition IDs.  Well, not entirely
true... it's used on Mac's as a heuristic, for finding swap
devices, etc. - but I think this unnecessary.

LVM also uses it, but I also think it's unnecessary.

So, can anyone remember why we have partition IDs?  (as opposed
to just probing for signatures on the fs)  If new partition table
types come out (which is happening, believe it or not...), how
should Linux/fdisk/parted handle IDs?  Should we have one Linux
type, that we use for everything?  Should we have one type for each
TYPE of data (file system, swap, logical volume physical device, etc.)?

Tchau,
Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andries . Brouwer

 does partitioning slow things down?

No.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Russell King wrote:
 
 Andrew Clausen writes:
  Why is this necessary?  Can't the RAID drivers probe the device for
  signatures, the same way file systems do?
 
 One possible problem I can see here is to do with removal of RAID.  Think
 of a RAID-1 array (2 or more disks containing identical data).  The
 partition can be validly identified as an ext2 filesystem.  But wait, it
 has a RAID superblock at the end.
 
 How do we know if this superblock is current or not?  After all, a mke2fs
 on the device won't remove it.  Yes, you could fill the partition with
 zeros and start again, or you could just change the partition ID.

Yeah, this is a big problem.

Parted solves it, by defining a clobber() operation for each file system
type (which can/should be extended to RAID, if/when we get around to
supporting it properly).  clobber() removes all signatures.

So, I guess the short answer is: mke2fs should remove the RAID super.
For those of you who don't like all-in-one libraries like libparted -
not mentioning any Christo^Wnames - you could probably have
clobber.ext2,
etc.

However, you would want to have a comprehensive set of clobber.*.
Fortunately, clobber.X is going to be very small, so this should be
a problem.

So, the alternative is to define a RAID partition "data" type.  (And
forget about IDs for file systems)

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread H. Peter Anvin

Followup to:  [EMAIL PROTECTED]
By author:Andrew Clausen [EMAIL PROTECTED]
In newsgroup: linux.dev.kernel
 
  Apart from
  that, the kernel couldn't care.  You could set all your Ext2 partitions
  as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
  changed.
 
 Exactly.  So, for new disk labels, or whatever, we should recommend to
 the relevant hackers that we have exactly one number for Linux.  Or
 what?
 

We have:

   0x82 - Linux swap
   0x83 - Linux filesystem
   0x85 - Linux extended partition (yes, this one does matter!)

0x81 isn't Linux, but rather a Minix partition ID.

There seems to be some value in having a different value for swap.  It
lets an automatic program find a partition that does not contain data.

-hpa

-- 
[EMAIL PROTECTED] at work, [EMAIL PROTECTED] in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andreas Dilger

H. Peter Anvin writes:
 We have:
 
0x82 - Linux swap
0x83 - Linux filesystem
0x85 - Linux extended partition (yes, this one does matter!)
 
 There seems to be some value in having a different value for swap.  It
 lets an automatic program find a partition that does not contain data.

What would be wrong with changing the kernel to skip the first page of
swap, and allowing us to put a signature there?  This would be really
useful for systems that mount ext2 filesystems by LABEL or UUID.  With
the exception of swap, you currently don't need to care about what disk
a filesystem is on.  Of course, LVM also fixes this, but not everyone
runs LVM.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/   -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread H. Peter Anvin

Andreas Dilger wrote:
 
 H. Peter Anvin writes:
  We have:
 
 0x82 - Linux swap
 0x83 - Linux filesystem
 0x85 - Linux extended partition (yes, this one does matter!)
 
  There seems to be some value in having a different value for swap.  It
  lets an automatic program find a partition that does not contain data.
 
 What would be wrong with changing the kernel to skip the first page of
 swap, and allowing us to put a signature there?  This would be really
 useful for systems that mount ext2 filesystems by LABEL or UUID.  With
 the exception of swap, you currently don't need to care about what disk
 a filesystem is on.  Of course, LVM also fixes this, but not everyone
 runs LVM.
 

It already does that, you know.  Nothing inherently wrong, *EXCEPT* that
it breaks a bunch of programs already out there.

-hpa

-- 
[EMAIL PROTECTED] at work, [EMAIL PROTECTED] in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Brian Gerst

Andrew Clausen wrote:
 
 Hi all,
 
 We have roughly 10 different types of partition tables.  We hate
 them, but it looks like they won't be going away for a long time.
 
 Partition IDs seem to create a lot of confusion.  For example,
 most people use 0x83 for both ext2 and reiserfs, on msdos
 partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
 Mac, etc.
 
 Linux doesn't really use partition IDs.  Well, not entirely
 true... it's used on Mac's as a heuristic, for finding swap
 devices, etc. - but I think this unnecessary.
 
 LVM also uses it, but I also think it's unnecessary.
 
 So, can anyone remember why we have partition IDs?  (as opposed
 to just probing for signatures on the fs)  If new partition table
 types come out (which is happening, believe it or not...), how
 should Linux/fdisk/parted handle IDs?  Should we have one Linux
 type, that we use for everything?  Should we have one type for each
 TYPE of data (file system, swap, logical volume physical device, etc.)?

For compatability with dual booting other operating systems.  Would you
want Windows walking over your ext2 filesystems?  Linux didn't invent
the partition table schemes, it just borrows from those that are most
common for a given architecture (ie. msdos on PC compatable systems,
etc.)

--

Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Hi all,

We have roughly 10 different types of partition tables.  We hate
them, but it looks like they won't be going away for a long time.

Partition IDs seem to create a lot of confusion.  For example,
most people use 0x83 for both ext2 and reiserfs, on msdos
partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
Mac, etc.

Linux doesn't really use partition IDs.  Well, not entirely
true... it's used on Mac's as a heuristic, for finding swap
devices, etc. - but I think this unnecessary.

LVM also uses it, but I also think it's unnecessary.

So, can anyone remember why we have partition IDs?  (as opposed
to just probing for signatures on the fs)  If new partition table
types come out (which is happening, believe it or not...), how
should Linux/fdisk/parted handle IDs?  Should we have one Linux
type, that we use for everything?  Should we have one type for each
TYPE of data (file system, swap, logical volume physical device, etc.)?

Tchau,
Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Jason Venner


The bios on my laptop will only enable the suspend to disk function,
if there is a partion on the disk that is 'IBM Thinkpad hibernation'
(and it is a primary partition).

So, linux may not care but lots of other things that users rely on do
care.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andries . Brouwer

Andrew Clausen writes:

 can anyone remember why we have partition IDs?

Partition IDs are not necessary. Linux works fine
when you have no partition table at all, and have a
parttab file in an initrd disk telling the kernel where
the partitions are supposed to be.

No kernel changes required. Today you do not need partition IDs.
Today you can dynamically add and delete partitions,
without involving anything like a partition table.

But people use various schemes to partition their disks,
mainly because also other operating systems like DOS or MacOS
use the same disks. In such a situation it is useful to
agree with the other OS on where the partitions are.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Russell King

Andrew Clausen writes:
 But, for "well behaved operating systems", can't we do it this way?
 (For the dos partition table scheme, 0x83 could be our "file system
 type", 0x82 our "swap type", or whatever)

I think you're complaining about the partition IDs in this thread, and not
the partition "schemes" that Linux supports.  Am I right?

Well, the Linux kernel doesn't really care about partition IDs at all,
except in one circumstance - to detect auto RAID partitions.  Apart from
that, the kernel couldn't care.  You could set all your Ext2 partitions
as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
changed.

About the only user programs that know about partition IDs are:
- fdisk (its part of the partition table format)
- installers (to stop users doing stupid things)

--
Russell King ([EMAIL PROTECTED])The developer of ARM Linux
 http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Russell King

Andrew Clausen writes:
 Why is this necessary?  Can't the RAID drivers probe the device for
 signatures, the same way file systems do?

One possible problem I can see here is to do with removal of RAID.  Think
of a RAID-1 array (2 or more disks containing identical data).  The
partition can be validly identified as an ext2 filesystem.  But wait, it
has a RAID superblock at the end.

How do we know if this superblock is current or not?  After all, a mke2fs
on the device won't remove it.  Yes, you could fill the partition with
zeros and start again, or you could just change the partition ID.

--
Russell King ([EMAIL PROTECTED])The developer of ARM Linux
 http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Glenn McGrath

Andrew Clausen wrote:
 
 Hi all,
 
 We have roughly 10 different types of partition tables.  We hate
 them, but it looks like they won't be going away for a long time.
 
 Partition IDs seem to create a lot of confusion.  For example,
 most people use 0x83 for both ext2 and reiserfs, on msdos
 partition tables.  People use "Apple_UNIX_SVR2" for ext2 on
 Mac, etc.
 
 Linux doesn't really use partition IDs.  Well, not entirely
 true... it's used on Mac's as a heuristic, for finding swap
 devices, etc. - but I think this unnecessary.
 
 LVM also uses it, but I also think it's unnecessary.
 
 So, can anyone remember why we have partition IDs?  (as opposed
 to just probing for signatures on the fs)  If new partition table
 types come out (which is happening, believe it or not...), how
 should Linux/fdisk/parted handle IDs?  Should we have one Linux
 type, that we use for everything?  Should we have one type for each
 TYPE of data (file system, swap, logical volume physical device, etc.)?
 
 Tchau,
 Andrew Clausen
 

As far as i know partition ID's are only supposed to say what type of
filesystems is on a partition, which is a totally stupid and crappy idea
that makes no sense whatsoever (i feel strongly about this).

Linux filesystems have a filesystem type field in the filesystems
superblock, which is what mount -a tries to use to guess the filesystem,
the problem is that this flag isnt in the same place, so its not as
valuable as it should be.

Have a partition marker to indicate the filesystem is stupid because the
two are totally independent, of course i can format a filesystem of type
0x82 with whatever filesystem i want, and then there is also sorts of
confusion when the partition table says the wrong thing.

In an ideal world the filesystem superblock flag for any filesystem type
would be easy to get to, and then would also be a partition_table flag
magic bit that indicates the type of partition table (i.e. pc_bios,
solaris, bsd, atari/amiga, LVM) with the absence of the partition_type
flag you could assume it was a whole disk and check my reading the
superblock filesystem.

But of course you could never have an idealistic thing such as this
becuase different people would have to agree on one place for the flags.

Glenn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Russell King wrote:
 
 Andrew Clausen writes:
  But, for "well behaved operating systems", can't we do it this way?
  (For the dos partition table scheme, 0x83 could be our "file system
  type", 0x82 our "swap type", or whatever)
 
 I think you're complaining about the partition IDs in this thread, and not
 the partition "schemes" that Linux supports.  Am I right?

Well, I don't like either, hehe.  But, partition IDs are the only
thing I'm talking about here (the other was merely drive-by flaming)

 Well, the Linux kernel doesn't really care about partition IDs at all,
 except in one circumstance - to detect auto RAID partitions.

Why is this necessary?  Can't the RAID drivers probe the device for
signatures, the same way file systems do?

(BTW: LVM does this too, and linux-ppc uses partition types as
heuristics
for finding the root device, IIRC, and lots of other boring stuff.  But,
I suspect it isn't needed)

 Apart from
 that, the kernel couldn't care.  You could set all your Ext2 partitions
 as ID 82, your swap as ID 83 and Linux would carry on as if nothing had
 changed.

Exactly.  So, for new disk labels, or whatever, we should recommend to
the relevant hackers that we have exactly one number for Linux.  Or
what?

 About the only user programs that know about partition IDs are:
 - fdisk (its part of the partition table format)
 - installers (to stop users doing stupid things)

Exactly.

Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: Partition IDs in the New World TM

2001-01-22 Thread Andrew Clausen

Brian Gerst wrote:
 For compatability with dual booting other operating systems.  Would you
 want Windows walking over your ext2 filesystems?  Linux didn't invent
 the partition table schemes, it just borrows from those that are most
 common for a given architecture (ie. msdos on PC compatable systems,
 etc.)

Of course, we need to be careful of this kind of stuff.  (That's the
only reason we have partition tables in the first place!)

But, for "well behaved operating systems", can't we do it this way?
(For the dos partition table scheme, 0x83 could be our "file system
type", 0x82 our "swap type", or whatever)

Tchau,
Andrew Clausen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/