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 22:44:58
On Fri, Sep 16, 2005 at 11:16:39PM +0200, Pavel Cahyna wrote:
> On Fri, Sep 16, 2005 at 09:13:31PM +0100, David Laight wrote:
> > 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)
> 
> BTW thanks for your suggestion, but it doesn't work. Kernel still prints:
> "sd2: no disk label" and there is only the "c" partition... I tried even
> detaching and re-attaching the disk.

Hum....

Looks like the alpha kernel only looks for the label at offset 64 in sector 0.
You might manage to copy the label there (probably via a file to get the
offset correct, and with care because the kernel will try hard to stop you
writing to the label sector).

Actually you can run the alpha disklabel to setup a label that describes
sectors 63 - 6Gb as an FFS partition.
That will make the disk not bootable.  It will also (probably) destroy
the mbr partition info.  However I believe the code that the i386 kernel
uses (in kernel/subr_disk_mbr.c) will find that label.

	David

-- 
David Laight: david@l8s.co.uk