Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Nov 2002 04:18:54 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/geom geom_mbr.c
Message-ID:  <20021102121854.GA1417@athlon.pn.xcllnt.net>
In-Reply-To: <20451.1036239062@critter.freebsd.dk>
References:  <200211021201.gA2C1CKD025754@repoman.freebsd.org> <20451.1036239062@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 02, 2002 at 01:11:02PM +0100, Poul-Henning Kamp wrote:
> In message <200211021201.gA2C1CKD025754@repoman.freebsd.org>, Marcel Moolenaar 
> writes:
> >marcel      2002/11/02 04:01:12 PST
> >
> >  Modified files:
> >    sys/geom             geom_mbr.c 
> >  Log:
> >  Remove the GEOM_GPT hack. We now check for partition type 0xEE and
> >  skip those. This handles the Protective MBR (PMBR) which consists
> >  of a single partition of type 0xEE that covers the whole disk and
> >  as such protects the GPT partitioning. We allow other partitions to
> >  be present besides partitions of type 0xEE and as such interpret
> >  partition type 0xEE as a "hands-off" partition only.
> >  
> >  While here, fix g_mbrext_dumpconf to test if indent is NULL and
> >  dump the data in a form that libdisk can grok. Change the logic
> >  in g_mbr_dumpconf to match that of g_mbrext_dumpconf. This does
> >  not change the output, but prevents a NULL-pointer dereference
> >  when indent == NULL && pp == NULL.
> 
> Thanks!  I had overlooked that one.

No problem.

I also fixed libdisk (see my commit to disk.c). My disk is now
correctly handled. Feel free to tweak it further if you think
it can be done better.

athlon% ./tst01 ad0
MBR [ad0s4] 16783 16383
error = 0
MBREXT [ad0s5] 16783 16383
error = 357
MBR [ad0s3] 33167 45129
error = 0
BSD [ad0s3f] 41359 36937
error = 0
BSD [ad0s3e] 37263 4096
error = 0
BSD [ad0s3b] 33167 4096
error = 0
MBR [ad0s2] 399 16383
error = 0
MBR [ad0s1] 0 399
error = 0
BSD [ad0s1a] 0 399
error = 0
c 0x8062040
c->p 0x8062080
c->p->p 0x0
--==##==--
Debug_Disk(ad0)  bios_geom=0/16/63 = 0
  boot1=0x0, boot2=0x0, bootmgr=0x0
-->        0x8062040        0 40088160 40088159 ad0      -                ??       0x00 
  -->      0x8062080        0       63       62 -        -                unused   0x00 
  -->      0x8062240       63   204561   204623 ad0s1    (null)           freebsd  0xa5 =
    -->    0x8062280       63   204561   204623 ad0s1a   (null)           part     0x00 
  -->      0x8062200   204624  8388576  8593199 ad0s2    (null)           mbr      0x0c =
  -->      0x80620c0  8593200  8388576 16981775 ad0s4    (null)           mbr      0x0f =
  -->      0x8062100 16981776 23106384 40088159 ad0s3    (null)           freebsd  0xa5 =
    -->    0x8062180 16981776  2097152 19078927 ad0s3b   (null)           part     0x00 
    -->    0x80621c0 19078928  2097152 21176079 ad0s3e   (null)           part     0x00 
    -->    0x8062140 21176080 18912080 40088159 ad0s3f   (null)           part     0x00 


kern.geom.conftxt: 0 DISK ad0 20525137920 512 hd 16 sc 63
1 MBR ad0s4 4294950912 512 i 3 o 4399718400 ty 15
2 MBREXT ad0s5 4294918656 512 i 0 o 32256 ty 11
1 MBR ad0s3 11830468608 512 i 2 o 8694669312 ty 165
2 BSD ad0s3f 9682984960 512 i 5 o 2147483648
2 BSD ad0s3e 1073741824 512 i 4 o 1073741824
2 BSD ad0s3c 11830468608 512 i 2 o 0
2 BSD ad0s3b 1073741824 512 i 1 o 0
1 MBR ad0s2 4294950912 512 i 1 o 104767488 ty 12
1 MBR ad0s1 104735232 512 i 0 o 32256 ty 165
2 BSD ad0s1c 104735232 512 i 2 o 0
2 BSD ad0s1a 104735232 512 i 0 o 0

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021102121854.GA1417>