There is no green card, which is based on any non-immigrant visa, including H1B. Body shops and some other companies use a promise of a green card to convince foreigners to join on H1B but it's not what H1B is for and it doesn't mean it's an immigrant visa or a part of the "path to green card". The whole practice, is, if not illegal then immoral.
> you can still stay and a green card based on it (eventually).
No, you can't.
You can apply for an immigrant visa based on any of the qualifications for such a visa without having to leave the country first if you can keep a current H1B or other dual-intent visa, but the H1B itself does not qualify you for an immigrant visa no matter how much time you stay on it.