Subject: Re: How to write NetBSD boot blocks to DOS disk?
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 03/28/1996 11:57:53
>>The disklabel is on the disk, yes. It's on there, I've rebooted, I've
>>newfs'd the NetBSD partitions. I just haven't put the NetBSD boot
>>blocks on it... this time. It boots MS-DOS fine. It access the
>>partitions under NetBSD fine. I just can't boot NetBSD from that
>>drive.
>Hmmm. So what does it do when you try to boot from that parition? What
>kind of boot selector are you using, or are you just marking partitions
>active using fdisk?
Right. I was just marking the paritions manually for now. I can boot
DOS. When I mark the NetBSD partition, it just tells me something
like "no operating system on disk", or something similar, when I try
to boot it.
When I do a "disklabel -B ...", I can boot NetBSD just fine, but it
toasts the DOS parition table. If I boot a DOS floppy and run fdisk
after that, it just gives me garbage partition data.
My concern is: where does disklable put the boot blocks? And, where
should it be putting them? Should I maybe start the whole disk in the
disklabel at sector one instead of zero, or at cylinder one, instead
of zero? I dunno...
>>>(I'm wondering about that offset for the MS-DOS parition - usually it's
>>>32, not 63).
>>The time I tried to use NetBSD fdisk it also toasted the DOS
>>partition. I may have done something wrong, but I don't think so.
>Using the NetBSD fdisk to read the MS-DOS partition table won't harm
>anything (Well, it really shouldn't - it asks you before it writes anything).
Well, no... but I thought you meant do something useful with it... ;-)
It gives the same info as the stuff I have in my protofile...
******* Working on device /dev/rwd0d *******
parameters extracted from in-core disklabel are:
cylinders=1048 heads=16 sectors/track=63 (1008 sectors/cylinder)
Figures below won't work with BIOS for partitions not in cylinder 1
parameters to be used for BIOS calculations are:
cylinders=1048 heads=16 sectors/track=63 (1008 sectors/cylinder)
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 0 is:
sysid 6 (Primary 'big' DOS (> 32MB))
start 63, size 205569 (100 MB), flag 0
beg: cylinder 0, head 1, sector 1
end: cylinder 203, head 15, sector 63
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
sysid 165 (NetBSD or 386BSD)
start 205632, size 826560 (403 MB), flag 80
beg: cylinder 204, head 0, sector 1
end: cylinder 1023, head 15, sector 63
-----------------------------------------------------------------------------
Michael L. VanLoon michaelv@HeadCandy.com
--< Free your mind and your machine -- NetBSD free un*x >--
NetBSD working ports: 386+PC, Mac 68k, Amiga, HP300, Sun3, Sun4,
DEC PMAX (MIPS), DEC Alpha, PC532
NetBSD ports in progress: VAX, Atari 68k, others...
-----------------------------------------------------------------------------