mlel...@serpens.de (Michael van Elst) wrote:

> bea...@sdf.org (beaker) writes:
>
> > gpt biosboot [-A] [-c bootcode] [-b startsec] [-i index] [-L label]
>
> >for a gpt partitioned disk or is this relatively recent addition
> >just an alternative of convenience?
>
> A regular BIOS (not UEFI) loads the MBR from block 0 of a disk.
> The boot program in the MBR checks the embedded partition table
> and then continues to load a PBR from the first block of the
> active partition. The PBR is then executed and continues with
> the boot process.
>
> MBR = master boot record
> PBR = partition boot record
>
> We maintain the regular MBR (and the partition table) with
> the fdisk program (and the PBR with the installboot program).
>
> If you use a GPT, there is only a "protective MBR" for compatibility.
> But it's still possible to include a boot program in that "protective MBR"
> that understands a GPT. This allows to use BIOS to boot from a
> GPT formatted disk.
>
> We maintain the GPT with the gpt program and 'gpt biosboot'
> stores such a special boot program.
>
> In your case however, you provide your own MBR (with grub)
> and 'gpt biosboot' would just overwrite grub with our boot
> program.

Thanks for that explaination.  It does seem like I could do
a targeted storage with

  # gpt biosboot -A -i 3  # gpt3 == FFS netbsd partition

which is how I managed to wipe out GRUB the first time.  Also
is the default bootcode (XXX) correct or should another boot
code be used via '-c' for this non-UEFI + gpt scheme? 

-B

Reply via email to