Subject: Re: NetBSD and FreeBSD co-existing
To: None <perry@piermont.com>
From: Andrew Brown <codewarrior@daemon.org>
List: port-i386
Date: 06/21/1997 04:22:43
>> UTSL. Try 'egrep 'dos|mbr' /usr/src/sbin/disklabel/disklabel.c,
>> Or look at the parts inside #ifdef __i386__.
>
>Oh, THAT.
>
>That stuff only uses the MBR to find the NetBSD partition on the raw
>disk or to totally wipe it out (if there is no NetBSD partition) it
>doesn't usually touch it in any way. I don't believe I've ever even
>seen the wipeout code invoked! You have to fuck the machine pretty
>badly to have that happen -- or try to label a disk you haven't used
>fdisk on first!

i beg to differ!  i recently stuck a new 5 gig ide drive in my machine
(it's an old 486dx/50) and wanted to install netbsd, dos, and linux.
i installed the linux first, after completely setting up the partition
table with the linux partition as "active" and planned on using lilo
to choose between linux, netbsd, and dos.  then i went on to install
netbsd and even though i did not "fuck the machine pretty badly",
netbsd went right ahead and installed it's own bootblocks in the mbr.
now, unless i use lilo via a floppy, the mbr just jumps right to
netbsd without even consulting which partition is active.

>However, disklabel has nothing to do with altering the contents of the
>MBR -- it doesn't set MBR partition sizes or types, ever. It knows
>nothing about such stuff.

i know it doesn't play with the partition table at all (unless there
isn't one in which case it makes it's own), but fdisk does and it only
does a poor job at that.  maybe this should be a separate question
from netbsd when you write a disklabel?  have it confirm that you want
the netbsd bootblocks in the mbr as opposed to the beginning of
/dev/[wd]d0a?

-- 
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
codewarrior@daemon.org                               that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."