So, I don't know exactly how I managed to set up the CF card the first time. But somehow I managed to get the NetBSD partition starting at sector 0 according to disklabel.
Jump forward a few months. I'm trying to build out a script to generate images for a CF card, and playing live with a card in the USB CF adapter. And, well, you already see where this is going.
Fortunately, I've only blown away the MBR. The firmware kicks back with no active partition and just stares at me.
I know. I'll netboot. On my ... OS X based Mac. No problem.
Some quick searching turned up mspo's page on netbooting a Soekris with NetBSD on OS X. ( http://www.mspo.com/soekris.html ) This page covered netbooting on NetBSD 3.0. I needed 4.0 on this box, so it shouldn't be much of a problem, right? Heh.
NetBSD 4.0 no longer has a pxeboot_ia32_com0.bin. This is the version of pxeboot_ia32.bin that is configured for serial console. The only documentation talks about using installboot to change parameters. I have no active 4.0 systems. I have no easy way to get any system to be a 4.0 system. And this was supposed to be a quick 1) netboot the netbsd-INSTALL kernel 2) change fdisk.
I just started off with the idea that building a cross toolchain so I could build a cross installboot under OS X was out of the question. Discussion with the developer who removed the _com0 variant was more helpful than the docs. It's possible to use dd(1) to rewrite the right pages in the pxeboot binary itself to adjust boot parameters. No instructions. No documentation.
I did the sensible thing: I used the pxeboot from 3.0.
Obviously this will eventually get deprecated. I've linked it here
http://labs.ono-sendai.com/p/aioDqqskX++stdGiqxIdFQ/
Long term, something better needs to be done with the NetBSD side of things. Time to open some bugs and hope I've got free time someday.
Back to my Soekris however. The fdisk in 4.0 doesn't want to let me play with setting the mbr partition to say that NetBSD starts at sector 0. Disklabel still shows 0 as the start point (there is code in NetBSD to handle the "disklabel part a starts at 0" case). And the a partition mounts fine. I just can't label the disk.
At this point, I'm getting further from my original goal of writing some code. I punt. I untar a bunch of the relevant bits (base, etc, comp, text .tgz's) onto the Mac and netboot a real kernel. A laid down source tree, and I'm golden.
End result:
Yeah, I need to keep a backup dev environment somewhere to deal with this sort of crap. It would have sucked less if I hadn't zorched the environment trying to build tools that would have allowed me to build other environments.
I'll worry about fixing that up after I've got a commitable version of the code I'm working on.
Subscribe to:
Post Comments (Atom)
2 comments:
I deal with that sort of junk with my soekris by keeping a copy of its OS in a vmware instance that I can fire up when necessary. It's nice for compiling patches and whatnot, too, since I obviously don't want to be compiling stuff on a CF card filesystem.
@benley
Yeah, the only reason I was even mucking with it on that system was that my lab was/is down.
Post a Comment