Subject: Re: MacBSD and native disklabels?
To: Frederick Bruckman <fb@enteract.com>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-mac68k
Date: 04/03/2000 23:31:54
At 21:49 Uhr +0200 3.4.2000, Frederick Bruckman wrote:
>On Mon, 3 Apr 2000, Hauke Fath wrote:
>
>> I am toying around with LFS on -current. The newfs_lfs(8) abort()s when you
>> try to newfs a partition that is not labelled "4.4LFS". As an alternative
>> to hacking newfs_lfs I recalled that mac68k can at least read native BSD
>> disklabels and hooked the disk to a Sun IPX.
>
>I thought it was only macppc that could use BSD disklabels, not mac68k.

mac68k/mac68k/disksubr.c::readdisklabel() looks for a MacOS partition
table, then for a DOS style MBR and finally for a native BSD disklabel.

From a look at sbin/disklabel/disklabel.c and sparc/sparc/disksubr.c it
seems that mac68k does not take into account an offset for 1st level
bootloader code in the bootsector.

sparc has a fixed offset of 0x80 here; disklabel(8) had this too (commented
out now), but switched to a more generic approach: It scans the read data
for the two magic numbers in steps of four byte.

I have hacked the disklabel(8) approach into mac68k/disksubr.c; only
another 3hr compile, and then let's see how it goes...

I think the kernel and disklabel(8) should be made to behave the same here.

	hauke


--
"It's never straight up and down"     (DEVO)