Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 May 2003 11:09:55 -0300
From:      "Daniel C. Sobral" <dcs@tcoip.com.br>
To:        walt <wa1ter@myrealbox.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: bsdlabel question
Message-ID:  <3EB670B3.6030005@tcoip.com.br>
In-Reply-To: <3EB67397.1010109@myrealbox.com>
References:  <b94skr$2mrk$1@FreeBSD.csie.NCTU.edu.tw> <3EB67397.1010109@myrealbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
walt wrote:
> Poul-Henning Kamp wrote:
> 
>> In message <3EB5FC94.7070901@myrealbox.com>, walt writes:
>>
>>> Poul-Henning Kamp wrote:
>>>
>>>> In message <31649.1052067538@critter.freebsd.dk>, "Poul-Henning 
>>>> Kamp" writes:
>>>>
>>>>
>>>>> In message <3EB50F10.3010001@myrealbox.com>, walt writes:
>>>>>
>>>>>
>>>>>> Hi Poul-Henning,
>>>>>>
>>>>>> #bsdlabel  ad0s3
>>>>>> # /dev/ad0s3:
>>>>>> 8 partitions:
>>>>>> #        size   offset    fstype   [fsize bsize bps/cpg]
>>>>>> a: 15321596 140974726    4.2BSD        0     0     0
>>>>>> b:  1048576 139926150      swap
>>>>>> c: 16370235 139926150    unused        0     0         # "raw" 
>>>>>> part, don't edit
>>>>>
>>>>>
>>>>> Ahh, good point, forgot about that.  Will fix.
>>>>
>>>>
>>>>
>>>> OK, fixed now.
>>>
>>>
>>> I find that I now have the same problem that Martin had --
>>> 'cannot mount root:5'
> 
> 
>> If you cannot mount root, you may want to comment out this
>> check in sys/geom/geom_bsd.c:
>>
>>         if ((off_t)rawoffset * secsize != ms->mbroffset)
>>                 rawoffset = 0;
> 
> 
> Okay, root mounts again, thanks.  I'm still seeing all the same
> warnings with bsdlabel, though:
> 
> #bsdlabel ad1s3
> # /dev/ad1s3:
> 8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   a: 15321596 140974726    4.2BSD        0     0     0
>   b:  1048576 139926150      swap
>   c: 16370235 139926150    unused        0     0         # "raw" part, 
> don't edit
> partition a: offset past end of unit
> partition a: partition extends past end of unit
> partition b: offset past end of unit
> partition b: partition extends past end of unit
> partition c: offset past end of unit
> partition c: partition extends past end of unit
> bsdlabel: partition c doesn't start at 0!
> bsdlabel: An incorrect partition c may cause problems for standard 
> system utilities

Disklabel offsets are 0-based. It doesn't matter where the _slice_ 
starts, the partition offset always has the beginning of the slice as 
reference.

In that light, the above sure looks... wrong.

-- 
Daniel C. Sobral                   (8-DCS)
Gerencia de Operacoes
Divisao de Comunicacao de Dados
Coordenacao de Seguranca
VIVO Centro Oeste Norte
Fones: 55-61-313-7654/Cel: 55-61-9618-0904
E-mail: Daniel.Capo@tco.net.br
         Daniel.Sobral@tcoip.com.br
         dcs@tcoip.com.br

Outros:
	dcs@newsguy.com
	dcs@freebsd.org
	capo@notorious.bsdconspiracy.net

Hacking's just another word for nothing left to kludge.



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