Issues with boot0/boot1 on a CF card

I have a WRAP board (PC Engines) which had some issues running 12.4, so I wanted to reinstall 12.1 and ran into boot issues. I've built a blank CF card with a combination of `gpart`/`bsdlabel` and untarring the 12.1 base/kernel tarballs. I used gpart rather than fdisk to create the slices directly on the CF card, mounted in a 12.1 system. gpart also installed boot0. I used bsdlabel to create a partition on s1 and also to install /boot/boot. But when the thing boots up, I get the usual msgs about selecting a boot partition, prompting (and timing out) for a selection, followed by a '#'. Looking at the boot0sio.s code, this is an ASCII BEL replacement and it very much looks like it can't find boot1 or possibly boot2.

I've tried all manner of variations and the best I can come up with is the nature of the C/H/S or L/B/A config. In the fdisk era, you could configure this. But gpart works with sector offsets. Looking at how nanobsd.sh does this, it wires it to mdconfig [-x and -y] and then artificially creating the C/H/S mapping. I guess my next step is to instead use mdconfig, hard-wire the nheads/nsectors stuff, build up a disk image and then dd that to the CF card. This used to work, and I'd like to understand what's going on here. I assume it's the BIOS which interprets the int13 request and remaps it into an offset in the CF?

I guess I'm asking:
1. Am I right in thinking this is likely due to a borked C/H/S config which is sending the boot0 reads off to the wrong area?
2. Any debug pointers for boot0/boot1 issues? I realise it's very compact code, but it would be great to know what's annoying it.
3. Anyone have any nsects/nheads config for a sandisk 16G CF card? I note nanobsd.sh (and FlashDevice.sub) tops out at 4GB.
4. Any other thoughts or observations anyone might have?
 
The entire 12 major branch is end-of-life and not supported any more.


 
Back
Top