[Galaxy S II Original Android Development] the.gangster:
While (after the first tests that I reported here already) I'd agree on probably leaving android as is would be a good idea (as the still existing and formatted internalSD (mmcblk0p11) didn't "hurt" at all and was automatically hidden from most views/apps after switching to non-emulated by modifying storage.xml), I would not not agree on automatically switching to emu-mode by detecting the sdcard or its filesystem.

Remember: even if I never used pit-files/Odin anymore ever after Lanchon created the first versions of Repit, there are still a lot of people choosing that way to repartition their devices. Most of them "forget" to format internalSD (as it is missing in most repartition-guides).

Therefore I would expect quite many first time bootups not to have a properly formatted internalSD. So we can't tell, if that is on purpose (for switching to emulated) or by mistake (still having a big internalSD area which is simply not formatted). I would also not enfavor to strictly expect an 8MB internalSD as an identification. (I might choose to keep it a little bit bigger to allow dropping most needed files for switching to other ROMs in there that expect the standard partitioning)

and

I wouldn't mount internalsd as /misc either. I think it's dangerous to modify it in a way like that, where it looks like a completely different partition that also serves a completely different purpose AFAIK.

And if we can stick to kernel embedded recovery being a TWRP, there wouldn't be any need for that either.

The only problem that I always wanted to be solved in the main thread (and why I tested CM-Recovery over and over recently for its abilities) was, that the embedded recovery (which has been CM-recovery so far) should be able to flash an IsoRec-Recovery at least. This is quite important I think, as we don't want to have a million posts again flooding the threads where we have to explain how to switch the recovery to an IsoRec one by anything more than just flashing a zip. All the other ways need to much explainations compared to that.

If the embedded recovery would be a TWRP already, this would surely not depend on a /misc partition. And for the CM-recovery I don't understand why it is depending on a /misc partition either. This would be pretty stupid as not every device has such a partition. Is there no other way to modify it, not to depend on that?

Finally coming back to the "setting the ro.vold.primary_physical property early on every boot":

Would there be a way to make the detection looking for some kind of marker? Whereever we could place that. As we wouldn't want to have it deleted by simply clean flashing a ROM or installing a new recovery. On the other hand, simply leaving some kind of flagfile on the internalsd itself is probably also not viable, as it would also need to be mounted first, but then I doubt the above property would change a lot if changed thereafter, would it?

EDIT:

Do I understand you right?

So you changed the internalsd with Repit using the sdcard=++swap parameter and afterwards the recovery threw an error and flashing the ROM also failed?

If you pulled the recovery.log simply upload it here. Thx.