MBR code in non-booting drive

User discussion and information resource forum for BootIt Bare Metal and BootIt UEFI
Post Reply
eldiener
Posts: 67
Joined: Thu Apr 12, 2012 2:37 am

MBR code in non-booting drive

Post by eldiener »

I have partitions on two drives. BIBM is installed in my first drive. I assume it has its own bootup code in the MBR. In my second drive is the bootup code in the MBR of any significance ? Can I zero it out or maybe regenerate it with standard bootup code, even if it does not seem to be used ?

The general reason I am asking is that I attempted to install PC-BSD to a primary partition on my second hard drive. It failed with the message:

/usr/local/sbin/grub-bios-setup: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet..
/usr/local/sbin/grub-bios-setup: error: filesystem `zfs' doesn't support blocklists.
EXITERROR: Error 1: chroot /mnt grub-install --force /dev/ada2s3

Nobody on the PC-BSD forum bothered to answer my question of why it failed to install ( I admit not a good sign for an OS ). I have the intuitive feeling that it may have failed installing because it saw some garbage bytes in the bootup area of the MBR on the second drive, and became confused because it expected some bootup code there. So my idea is to regenerate it, or zero out, the bootup code area of the MBR ( not the partition area of course ) of the second drive. But I do not want to do that until I am absolutely sure it will not affect anything, since I have quite a few data partitions on that drive used by various OSs ( my current boot partitions are all on my first drive ).
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: MBR code in non-booting drive

Post by TeraByte Support(TP) »

I haven't tried PC-BSD for several years, but the MBR code on the 2nd drive is most likely not the problem.

It sounds like it tried to install Grub to the BSD partition on the 2nd drive, but failed because the ZFS file system doesn't support blocklists. It also says something about not supporting disks with multiple partitions (multiple partition labels) - which I don't understand where that comes from, since Grub, at least in Linux, definitely supports that.

Are there bootloader and filesystem options available that you can select during the install, or are you forced to take their defaults? Typically, you would want to install the bootloader to the BSD partition, and then boot that partition from BIBM. And the MBR code on the 2nd drive would not be a factor.

To answer your direct question, the MBR code on the 2nd drive does not affect booting unless you try to boot directly from that drive by making it the boot drive in the BIOS setup, or by swapping cables, etc.. The way you're booting (from HD0 with BIBM installed), it wouldn't affect that.

Which version of PC-BSD are you trying to install? Is it the new version 10 (Joule)?


eldiener wrote:
> I have partitions on two drives. BIBM is installed in my first drive. I
> assume it has its own bootup code in the MBR. In my second drive is the
> bootup code in the MBR of any significance ? Can I zero it out or maybe
> regenerate it with standard bootup code, even if it does not seem to be
> used ?
>
> The general reason I am asking is that I attempted to install PC-BSD to a
> primary partition on my second hard drive. It failed with the message:
>
> /usr/local/sbin/grub-bios-setup: warning: Attempting to install GRUB to a
> disk with multiple partition labels. This is not supported yet..
> /usr/local/sbin/grub-bios-setup: error: filesystem `zfs' doesn't support
> blocklists.
> EXITERROR: Error 1: chroot /mnt grub-install --force /dev/ada2s3
>
> Nobody on the PC-BSD forum bothered to answer my question of why it failed
> to install ( I admit not a good sign for an OS ). I have the intuitive
> feeling that it may have failed installing because it saw some garbage
> bytes in the bootup area of the MBR on the second drive, and became
> confused because it expected some bootup code there. So my idea is to
> regenerate it, or zero out, the bootup code area of the MBR ( not the
> partition area of course ) of the second drive. But I do not want to do
> that until I am absolutely sure it will not affect anything, since I have
> quite a few data partitions on that drive used by various OSs ( my current
> boot partitions are all on my first drive ).
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: MBR code in non-booting drive

Post by TeraByte Support(TP) »

I tried a similar scenario as yours, installing PC-BSD 10 to a partition (type 0xa5) on the 2nd drive, and was successful by:
1. using the text installer and
2. selecting "No boot-loader" on the boot manager screen (see page 69 of PC-BSD 10.0 handbook)

When you select "No boot-loader", it still installs boot code in the BSD partition, and then you can boot that partition by setting up a boot item in BIBM as you normally would.

Of the 3 bootloader choices, the default choice was grub, and the other was the Free BSD boot loader. I didn't see the bootloader options available in the graphical installer, although they may be hidden somewhere that I missed.
eldiener
Posts: 67
Joined: Thu Apr 12, 2012 2:37 am

Re: MBR code in non-booting drive

Post by eldiener »

TeraByte Support(TP) wrote:
> I haven't tried PC-BSD for several years, but the MBR code on the 2nd drive is most
> likely not the problem.
>
> It sounds like it tried to install Grub to the BSD partition on the 2nd drive, but
> failed because the ZFS file system doesn't support blocklists. It also says something
> about not supporting disks with multiple partitions (multiple partition labels) -
> which I don't understand where that comes from, since Grub, at least in Linux,
> definitely supports that.
>
> Are there bootloader and filesystem options available that you can select during the
> install, or are you forced to take their defaults? Typically, you would want to
> install the bootloader to the BSD partition, and then boot that partition from BIBM.
> And the MBR code on the 2nd drive would not be a factor.

This was my attempted setup. I tried to use the grub-slice option, which would have installed the PC-BSD bootup code directly into the primary partition, and then boot the partition using BIBM. But just attempting to do that in the PC-BSD graphical installation, before even trying to boot using BIBM, failed with the error messages I encountered and mention. Someone else has mentioned using the "No boot loader" option rather than grub-slice so I might try that also.

>
> To answer your direct question, the MBR code on the 2nd drive does not affect booting
> unless you try to boot directly from that drive by making it the boot drive in the
> BIOS setup, or by swapping cables, etc.. The way you're booting (from HD0 with BIBM
> installed), it wouldn't affect that.

Thanks ! I wouldn't be changing the boot drive in the BIOS or swap cables simply because all my OS boot partitions are on the first drive. So it looks like I am safe either clearing the boot code in the second partition or telling BIBM to regenerate standard boot code there.

>
> Which version of PC-BSD are you trying to install? Is it the new version 10 (Joule)?

Yes, it is the new version 10. There is now even a 10.1 so I could try that, just to see if it fixes my problem.

>
>
> eldiener wrote:
> > I have partitions on two drives. BIBM is installed in my first drive. I
> > assume it has its own bootup code in the MBR. In my second drive is the
> > bootup code in the MBR of any significance ? Can I zero it out or maybe
> > regenerate it with standard bootup code, even if it does not seem to be
> > used ?
> >
> > The general reason I am asking is that I attempted to install PC-BSD to a
> > primary partition on my second hard drive. It failed with the message:
> >
> > /usr/local/sbin/grub-bios-setup: warning: Attempting to install GRUB to a
> > disk with multiple partition labels. This is not supported yet..
> > /usr/local/sbin/grub-bios-setup: error: filesystem `zfs' doesn't support
> > blocklists.
> > EXITERROR: Error 1: chroot /mnt grub-install --force /dev/ada2s3
> >
> > Nobody on the PC-BSD forum bothered to answer my question of why it failed
> > to install ( I admit not a good sign for an OS ). I have the intuitive
> > feeling that it may have failed installing because it saw some garbage
> > bytes in the bootup area of the MBR on the second drive, and became
> > confused because it expected some bootup code there. So my idea is to
> > regenerate it, or zero out, the bootup code area of the MBR ( not the
> > partition area of course ) of the second drive. But I do not want to do
> > that until I am absolutely sure it will not affect anything, since I have
> > quite a few data partitions on that drive used by various OSs ( my current
> > boot partitions are all on my first drive ).
eldiener
Posts: 67
Joined: Thu Apr 12, 2012 2:37 am

Re: MBR code in non-booting drive

Post by eldiener »

TeraByte Support(TP) wrote:
> I tried a similar scenario as yours, installing PC-BSD 10 to a partition
> (type 0xa5) on the 2nd drive, and was successful by:
> 1. using the text installer and
> 2. selecting "No boot-loader" on the boot manager screen (see
> page 69 of PC-BSD 10.0 handbook)
>
> When you select "No boot-loader", it still installs boot code in
> the BSD partition, and then you can boot that partition by setting up a
> boot item in BIBM as you normally would.
>
> Of the 3 bootloader choices, the default choice was grub, and the other was
> the Free BSD boot loader. I didn't see the bootloader options available in
> the graphical installer, although they may be hidden somewhere that I
> missed.

The bootloader options in the graphical install are there. I will try with "No boot-loader" as you have suggested. BTW how did you create a primary partition type of 0xa5 ? I was not able to do this with BIBM, as it seems that BIBM does not allow me to manually enter a partition type when creating a partition. Did you have to end up swapping drive order from within BIBM to get PC-BSD to bootup correctly ?
TeraByte Support(TP)
Posts: 305
Joined: Wed Aug 31, 2011 4:22 pm

Re: MBR code in non-booting drive

Post by TeraByte Support(TP) »

eldiener wrote:
> The bootloader options in the graphical install are there. I will try with "No
> boot-loader" as you have suggested. BTW how did you create a primary partition
> type of 0xa5 ? I was not able to do this with BIBM, as it seems that BIBM does not
> allow me to manually enter a partition type when creating a partition. Did you have
> to end up swapping drive order from within BIBM to get PC-BSD to bootup correctly ?

To get the A5 type partition (xBSD), you can either type in 0xa5 (or 165) in the file system box (when creating partition), or you can enable "Full Partition List" in Settings, and then be able to choose that type from the file system drop down list.

There's no need to swap drive order. Just set up the BSD partition as the boot partition in your boot item. You can verify that the boot code was installed to the partition during the install by looking at the partition's Properties in BIBM Partition Work. It should say "Bootable: Yes" in the additional information section.
eldiener
Posts: 67
Joined: Thu Apr 12, 2012 2:37 am

Re: MBR code in non-booting drive

Post by eldiener »

TeraByte Support(TP) wrote:
> eldiener wrote:
> > The bootloader options in the graphical install are there. I will try with
> "No
> > boot-loader" as you have suggested. BTW how did you create a primary
> partition
> > type of 0xa5 ? I was not able to do this with BIBM, as it seems that BIBM does
> not
> > allow me to manually enter a partition type when creating a partition. Did you
> have
> > to end up swapping drive order from within BIBM to get PC-BSD to bootup
> correctly ?
>
> To get the A5 type partition (xBSD), you can either type in 0xa5 (or 165) in the file
> system box (when creating partition), or you can enable "Full Partition
> List" in Settings, and then be able to choose that type from the file system
> drop down list.
>
> There's no need to swap drive order. Just set up the BSD partition as the boot
> partition in your boot item. You can verify that the boot code was installed to the
> partition during the install by looking at the partition's Properties in BIBM
> Partition Work. It should say "Bootable: Yes" in the additional information
> section.

Everything worked fine with what you suggested and I can now boot into PC-BSD 10.0 using BIBM. Thanks !
Post Reply