[PC-BSD Testing] Some experiments with BTX

Mahmoud Al-Qudsi mqudsi at neosmart.net
Thu Jul 21 07:06:13 PDT 2011


Hello again everyone,

Per feedback from one of our users [1], I have modified the logic of the bootloader code in EasyBCD 2.1.1 b148 [2].

As a result of the changes in the last build, the BTX screen was being loaded and required user interaction (pressing F1 or F5) to boot into PC-BSD or FreeBSD. Obviously, this is less than desirable if there is an automated way of booting into BSD with only a single selection (i.e. the one of the BCD screen). 

In b148, for cases where PC-BSD is on the boot hard disk, the old method is now retained: the bootloader is chainloaded from the BSD partition bootsector. However, for GPT cases or for non-boot-drive MBR cases, the new (EasyBCD b147) PMBR/BOOT0 method is still used.

I'd appreciate if anyone dual-booting Windows and PC-BSD in either of these two scenarios could please test it and provide feedback. EasyBCD b148 can be downloaded from the beta listing at [2].

Thank you,

Mahmoud Al-Qudsi
NeoSmart Technologies

[1]: http://neosmart.net/forums/showthread.php?t=8673
[2]: http://j.mp/EBCD2

On Jul 7, 2011, at 8:34 PM, Mahmoud Al-Qudsi wrote:

> Hello,
> 
> As some of you may know, I've been testing the BTX bootloader in a number of various configurations over the past few days, with some help and guidance from Dru. My testing was all done with the July 1st snapshot of PC-BSD 9.0 on a MacBook in VMware Fusion.
> 
> I ran into problems in these configurations
> 
> * BTX has issues loading PC-BSD if (PC-BSD? or BTX?) is installed to something other than disk 0
> * In GPT mode, the MBR emulation structure for backwards compatibility somehow doesn't map correctly to the underlying slices
> 
> As a result of the first issue, if one is trying to chainload the PC-BSD bootloader from another bootloader (GRUB, BCD, NTLDR), one must first emulate a disk swap (map command in GRUB).
> As a result of the second issue, I'm unable to chainload the BTX bootloader from the disk itself (chainloader (hd1) in grub-speak)
> 
> The workaround for these issues is as follows, in the form of a GRUB menu file. It's assuming that something (Windows or Linux, most likely) is on disk 0 and PC-BSD is on disk 1. It will work if PC-BSD is on disk 0 after/before Windows/Linux as well.
> 
> title PC-BSD MBR
> map (hd0) (hd1)
> map (hd1) (hd0)
> map --hook
> chainloader (hd0,0)/boot0
> boot
> 
> title PC-BSD GPT
> map (hd0) (hd1)
> map (hd1) (hd0)
> map --hook
> chainloader (hd0,0)/pmbr
> boot
> 
> The above require that /boot/pmbr and /boot/boot0 (both attached, see btx.zip) be copied from PC-BSD to the root of a partition on hard disk 0 (this is hd0,0 in the above example). I plan on automating this procedure entirely (to the extent that you select which partition PC-BSD is installed to from a drop-down and everything else is done for you) in EasyBCD [1]. I'm currently out of the country, but hope to have a beta build of EasyBCD [2] that can do this mid-next week.
> 
> It should be noted that with such a configuration, there is *no need* to check the bootloader box in PC-BSD. In fact, it is preferred not to in order for the previous bootloader to not be overwritten (regardless of where PC-BSD is being installed and to which disk) and there will be no need to recover it and the user will not be locked out of whatever system he/she was using before.
> 
> Also of note is that in one of my several dozen setup runs, PC-BSD would not boot due to a problem in the boot stamping as a result of some oddity in the partitioning screen (perhaps something to do with certain choices made on the advanced partitioning tab, I don't know). I'm not sure what it was, since I had no reason at the time to copy the setup logs and this did not happen again. PC-BSD was installed correctly to the disk, but I guess either boot0 wasn't stamped or was stamped to the wrong location. I do remember that it was an MBR configuration, though.
> 
> This was my first experience with PC-BSD other than a quick twirl I gave it ages ago (6.0?), and I've learned a lot yet have a lot more to learn. I'm more than happy to help anyone with getting PC-BSD to boot if I can, and am hanging out in #pcbsd these days under the moniker mqudsi.
> 
> [1]: http://neosmart.net/dl.php?id=1
> [2]: http://j.mp/EBCD2
> 
> Regards,
> 
> Mahmoud Al-Qudsi
> NeoSmart Technologies
> 
> <btx.zip>



More information about the Testing mailing list