DragonFly BSD
DragonFly bugs List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1622] devfs doesn't create my ad4s3 (macbook)


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Dec 2009 12:22:36 -0800 (PST)

:It seems gpt starts numbering slices at 0, so the usual ad4s1 is ad4s0, ...=
:=20
:leading to the fact that the expected ad4s3 is at ad4s2.
:
:In any case, I'll update our GPT code to fix some other issues (for example=
:=20
:the slice type is always set to 1).

    Yah, I'm responsible for the numbering.  With GPT 's0' is index entry 0
    in the GPT.  I did it that way so the index number in the GPT table
    matched the slice number in the device name because it was really
    confusing when they were 1-off.

    I don't know what the best solution is but numbering from 0 has caused
    us other headaches so if you want to change it back to numbering from 1
    it's ok with me.  It will mess up anyone using GPT right now, thougg,
    they will have to fix up their fstab and such. 

:       40   409600      0  GPT part - EFI System
:   409640   293391      1  GPT part - Apple HFS
:   703031   400000      - =20
:  1103031   185671      2  GPT part - MS/Linux Basic Data
:  1288702   808417      - =20
:  2097119       32      -  Sec GPT table
:  2097151        1      -  Sec GPT header

     So e.g.             ^ index 0, 1 and 2 corresponds to s0, s1, and s2
     right now.

:# newfs_msdos /dev/ad0s2=20
:/dev/ad0s2: 185276 sectors in 46319 FAT16 clusters (2048 bytes/cluster)
:bps=3D512 spc=3D4 res=3D1 nft=3D2 rde=3D512 mid=3D0xf8 spf=3D181 spt=3D63 h=
:ds=3D256 hid=3D1103031=20
:bsec=3D185671
:
:Observe carefully that the bsec of the newfs actually matches the number of=
:=20
:sectors of the third partition, with gpt index 2.
:
:
:Cheers,
:Alex Hornung

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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