Bootloader problem

I installed FreeBSD 10 successfully in one of my partitions. I had selected manual mode during bsdinstall process and everything went off well. I also upped my wifi, installed xorg , xfce , nvidia and modified relevant portions of /boot/loader.conf and /etc/rc.conf as mentioned in the user guide.

My install of FreeBSD was an overwrite of an earlier Linux install. On reboot I got grub rescue> prompt. I was practically unable to do anything and in order to save my Windows partition, I booted windows DVD.The recovery console did not show any partition. I was damn scared and luckily I had a USB live drive with Hiren. I booted smartboot manager utility and loaded my Windows partition. Later I installed the Windows loader through EasyBCD .

On startup, I am not able to boot into FreeBSD partition. I tried through smartboot manager but I got the error that there is no sub partition to boot.

How do I get the FreeBSD partition to boot? I am sure the partition is untouched. Like Linux, I think I may have to install the FreeBSD boot loader locally in the UFS partition instead of MBR. Later on I can chain load the boot loader from EasyBCD. How do I do this?
 
vikrang said:
How do I get the FreeBSD partition to boot? I am sure the partition is untouched. Like Linux, I think I may have to install the FreeBSD boot loader locally in the UFS partition instead of MBR. Later on I can chain load the boot loader from EasyBCD. How do I do this?
If the FreeBSD partition is still intact then there should be no need to install the boot code again.

In order to use the Windows 7 (i guess) bootloader to boot FreeBSD you will need to copy part of the FreeBSD boot code to your Windows filesystem and create a boot menu entry that points to this file. For a FreeBSD UFS root partition the required file would be /boot/boot1. ZFS root on MBR partitioned disk needs the first 512 bytes of /boot/zfsboot. You can use the Windows BCDEDIT command to add a Real-Mode Boot Sector entry to the boot menu.

My FreeBSD boot menu entry looks like this for example:
Code:
Real-mode Boot Sector
---------------------
identifier              {bed9a920-e296-47cc-a55a-43dbf1c68c8b}
device                  partition=C:
path                    \Boot\zfsboot1.bin
description             FreeBSD
 
The install should have put the necessary bootcode in place. Nothing should have changed the FreeBSD slice, so it may be a problem of giving EasyBCD or grub the wrong parameters.

There is additional bootcode in the FreeBSD slice. Reinstalling the bootcode in case it was overwritten or not installed will cause no harm. Please make certain which MBR partition (slice) is used for the FreeBSD install. This example shows it on a SATA disk (ada0) as the second slice (s2) :
gpart bootcode -b /boot/boot ada0s2
 
Back
Top