Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2000 11:41:54 -0700 (PDT)
From:      John Baldwin <jhb@pike.osd.bsdi.com>
To:        John Reynolds~ <jreynold@sedona.ch.intel.com>
Cc:        questions@FreeBSD.org
Subject:   Re: diff between fdisk, boot0cfg, and disklabel -B? (was Re: recompiling boot blocks & serial console)
Message-ID:  <200008111841.LAA22766@pike.osd.bsdi.com>
In-Reply-To: <14740.12435.310805.691257@hip186.ch.intel.com> from John Reynolds~ at "Aug 11, 2000 09:57:55 am"

next in thread | previous in thread | raw e-mail | index | archive | help
John Reynolds~ wrote:
> 
> > On Thu, 10 Aug 2000, Mike Smith wrote:
> >
> > You need to recompile the bootblocks to change the baudrate; set 
> > BOOT_COMCONSOLE_SPEED in /etc/make.conf, then do:
> > 
> > # cd /sys/boot
> > # make clean cleandepend
> > # make depend && make && make install
> > # disklabel -B <boot device>
> 
> Good information!
> 
> Question: What is the difference between the "-B" option of disklabel, fdisk,
> and boot0cfg? They seem to do the same thing from reading the man pages but
> recently I was not able to use "disklabel -B" when using the "fixit"
> floppy. jhb said "use boot0cfg -B". I did and it worked.
> 
> I'm just wondering why there are 3 programs with seemingly the same option and
> if they are not the same, how do they differ?

They don't all do the same thing. :)  fdisk -B and boot0cfg -B do do the
same thing in that they both install MBR boot loaders, which are only
present on x86 machines.  This is the code that chooses which slice to
boot from.  disklabel -B sets the FreeBSD boot loaders, which are inside
the FreeBSD slice itself.  Maybe this diagram can help:

disk start                                                        disk end
--------------------------------------------------------------------------
| MBR   | FreeBSD slice                   | Windows slice                |
--------------------------------------------------------------------------
| boot0 | boot1     | FreeBSD data        | FAT | Windows data           |
--------| disklabel |                     |-------------------------------
        | boot2     |                     |
        -----------------------------------

The reason that both boot0cfg and fdisk have -B, is that fdisk -B is a
general tool for configuring the slice table in the MBR and installing
MBR boot loaders.  boot0cfg is a tool for installing and configuring
boot0, which is a specific MBR boot loader.  The -B option is the one
place in which those two programs' functionality overlap.

HTH.

> Thanks,
> 
> -Jr

-- 

John Baldwin <jhb@bsdi.com> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008111841.LAA22766>