Subject: RE: mount trouble
To: None <polzer02@stud.uni-passau.de>
From: Conrad T. Pino <NetBSD-Current@Pino.com>
List: netbsd-help
Date: 03/18/2004 09:33:43
Hi Leslie

> From: polzer02@stud.uni-passau.de [mailto:polzer02@stud.uni-passau.de]
> 
> > The fdisk is on i386 and *some* ports because it's the language Microsoft
> > operating systems understand and needs to be there to interoperate with
> > Microsoft.
> 
> So the partitioning scheme I come from is not a common standard but a
> relict from MS-DOS days?

It depends on what you mean by common (shared by all OR occurs frequently)
and what population is under consideration (all computers OR all operating
systems).

I'm going to stop here on this topic because this isn't helping solve your
problem and you can conduct the required surveys as well as I.

> > > For the practical part: why did you choose these offsets?
> > > I don't get it...
> > 
> > I'm suggesting you create disklabel entries that map your 2 FAT & 1 Linux
> > fdisk partitions into NetBSD disklabel slices.
> Where do you specify that it's a mapping? Why are these entries redundant
> (unused <--> msdos)?

The NetBSD disklabel system maps up to 16 letters "a-p" to 16 slices where
each slice is an offset & size number pair.  To make a slice useful it's
nice to know what's recorded in the slice i.e. "Filesystem type/sysid".

They're redundant because Microsoft created their own standard with no
regard to what the Unix world was doing.  Sound familiar?  To maintain
interoperability BOTH schemes must be present and therefore redundant.

> > An offset and size number pair describe a disk slice i.e. partition.
> > The offsets and sizes are 1 for 1 values taken from the fdisk output.
> Why does slice d start on 63 in fdisk and 0 in disklabel?

You've made an error.

NetBSD dictates the function of only 2 slices c,d even though the standard
install follows a typical slice usage only c,d are rigidly defined.

Slice d is always the entire physical disk so by definition it always starts
at 0 and it's size is the size of the physical disk.

Slice c is always the entire NetBSD portion of the disk taking into account
both other operating systems and the fdisk stuff if used.

I'm going to take the fdisk and disklabel output and inter cut them so
the relations ships are clear.  Look for -> lines:

Partition table:
0: sysid 12 (Primary DOS with 32 bit FAT - LBA)
    start 63, size 16723602 (8165 MB), flag 0x0
->  f:  16723602        63     MSDOS
->  63=63, 16723602=16723602
1: sysid 15 (Ext. partition - LBA)
    start 16723665, size 11020590 (5381 MB), flag 0x0
    Extended partition table:
        0: sysid 12 (Primary DOS with 32 bit FAT - LBA)
            start 16723728, size 10490382 (5122 MB), flag 0x0
->          g:  10490382  16723728     MSDOS
->          16723728=167237283, 10490382=10490382
        1: sysid 5 (Extended partition)
            start 27214110, size 530145 (258 MB), flag 0x0
            Extended partition table:
                0: sysid 130 (Linux swap or Prime or Solaris)
                    start 27214173, size 530082 (258 MB), flag 0x0
                    h:    530082  27214173     Linux Ext2
                1: <UNUSED>
                2: <UNUSED>
                3: <UNUSED>
        2: <UNUSED>
        3: <UNUSED>
2: <UNUSED>
3: sysid 169 (NetBSD)
    start 27744255, size 50411970 (24615 MB), flag 0x80
->  c:  50411970  27744255     unused      0     0         # (Cyl. 27524*- 77535*)
->  27744255=27744255, 50411970=50411970
->  a:    829521  27744255     4.2BSD   1024  8192    87   # (Cyl. 27524*- 28346)
->  b:   1575504  28573776       swap                      # (Cyl. 28347 - 29909)
->  e:  48006945  30149280     4.2BSD   1024  8192    86   # (Cyl. 29910 - 77535*)

->  d:  78165360         0     unused      0     0         # (Cyl.     0 - 77544)

Take note:

   by definition slice d overlaps all other slices,
   by definition slice c overlaps NetBSD slices i.e. a,b,e

Goals:

   slice f overlaps FAT partition
   slice g overlaps FAT partition
   slice h overlaps Linux partition

> > It's useful information but only to a very small population
> Why this? I'm sure there are a lot of people running the i386 port
> and wanting to mount their FAT32 or ext2 partitions...
> 
> > and for a very limited time period.
> Well, but that's the same with configuring your keyboard layout, isn't it?

I'm going to stop here on this topic because I'm not in a position to change
the current documentation.

> Leslie

Conrad