Subject: Re: mbrlabel problem
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 09/16/2005 21:13:31
On Fri, Sep 16, 2005 at 09:49:37PM +0200, Pavel Cahyna wrote:
> Hello,
>
> I'm on alpha and want to get data from BSD partition on a disk from a
> NetBSD/i386 machine. So I did:
> mbrlabel sd2
>
> the result was surprising:
>
> ----
> Found 4.2BSD partition; size 12287983 (5999 MB), offset 63
> adding 4.2BSD partition to slot a.
>
> 3 partitions:
> # size offset fstype [fsize bsize cpg/sgs]
> a: 16384 63 4.2BSD 1024 8192 16 # (Cyl. 0*- 13*)
> c: 35937500 0 unused 0 0 # (Cyl. 0 - 29898*)
>
> Not updating disk label.
> ----
>
> Size 6GB for a BSD partition looks reasonable, but why is later the size
> displayed as 16386 sectors, insead of 12287983 as in the first message?
> This is on 3.0_BETA.
>
> Please, isn't this a bug? Or is just my expectation wrong?
Well, mbrlabel generates a netbsd disklabel from the fdisk partition layout.
What you want to do is locate the netbsd label that is in the 2nd sector of
the pbr and make the alpha system use that.
You might find you can copy the label to where the alpha system will
find it, eg:
# dd if=/dev/sd2c skip=64 seek=1 count=1 of=/dev/sd2c
(I suspect the kernel scans the first 8k of the disk looking for a label)
Alternatively modify the alpha kernel....
David
David
--
David Laight: david@l8s.co.uk