[PC-BSD Testing] Some experiments with BTX

Mahmoud Al-Qudsi mqudsi at neosmart.net
Thu Jul 7 10:34:06 PDT 2011


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

title PC-BSD GPT
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (hd0,0)/pmbr

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


Mahmoud Al-Qudsi
NeoSmart Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/testing/attachments/20110707/01f7d3d7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btx.zip
Type: application/zip
Size: 2328 bytes
Desc: not available
URL: <http://lists.pcbsd.org/pipermail/testing/attachments/20110707/01f7d3d7/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/testing/attachments/20110707/01f7d3d7/attachment-0001.html>

More information about the Testing mailing list