> A BSD disklabel will be on sector 1 if you create a filesystem that > starts at 0. > > I am not sure if you are talking about sector numbers of the disk, or of > a partition.
I am talking about the netbsd/a9 DOS partition, and I am doing `mkfs.ext2 -O^dir_index` all over it. That partition starts either at sector 63 or 2048 -- no additional problems there, both offsets behave the same so far in terms of encountered issues. And it ends +25G later but I could also use the full 1TB disk (no big difference there so far either). > So that means you did get the MBR to read the chainload sector 0 of the > partition (that you dd'd) and then the 2-13 or whatever, but then it > could not deal with the fs. Yes we got into the phase 1 boot strap. It just does not know where to find the (phase 2) netbsd boot loader. > Here, I think we are lacking clarity on the plan for booting ext2, and > that someone (you?) should figure that out, rather than guessing. It is a learning process indeed. Test&Try is one of the ways to proceed;-) But yes I obviously need more theory knowledge. > You may be better off with FreeBSD as an installation base. I will try building the ext2 fs from there. Actually I am wondering if the FreeBSD UFS and NetBSD ones could be somehow compatible. As a matter of fact I could validate that NetBSD FFSv2 could be mounted just fine (and RW) from FreeBSD 11.1. > You can also do a tools build for the rescue OS and copy nbdisklabel, > nbinstallboot onto the rescue system and then run them. Ok that is another another plan. > You could also set up a disk that is laid out how you want the system to > be, with a smallish (0.5G) root fs as wd0a. And then in linux download > that and write it to the disk. So you'd have netbsd bootblocks and no > grub. Yes that would be an option and it could eventually scale across different hardware models. The rest of the partitioning and system prep would be done/scripted on top of that smalling working root file-system. Drawback it I would have to rebuild the full smallish disk image at every NetBSD release, instead of just updating the deployment script. I could use sysinst (as I am able to load a kernel) but that's far less scalable as I would have to reach the crappy Java console every time to proceed with the installation. There is also miniroot.kmod which would maybe help me on this front. > You mention grub, but I don't know why that's involved if this is bare > metal, other than that it may be that's all you could write from the > linux installer. Exactly. That's the only thing that works so far. I finally heard NetBSD/i386 may be MULTIBOOT compatible, though (and not only the XEN dom0 flavor as a module). I did not try that. > So to understand, you or someone will have to really understand the > ext2fs layout and the theory of how bootxx_ext2fs is supposed to be > placed and how it is supposed to be run and then how /boot is supposed > to be able to read ext2fs. Yes