Generally, you can be issued a nonimmigrant visa if your passport is valid for at least 6 months. However, for passports of countries in the "6-month club" (which includes India), a nonimmigrant visa can be issued any time up to the expiration of the passport. See 9 FAM 403.9-3(B).
The H1b visa should expire at the same time as your H1b petition. A US visa's validity is not limited by the passport's expiration -- a valid visa on an expired passport remains valid and can be used together with a valid passport of the same type issued by the same country to enter the US. So whether you get the visa on your new or old passport won't affect the visa's length of validity.
When you enter the US, someone entering on H1b is usually admitted on their I-94 until the expiration of their H1b petition, but it can be shorter if the passport will expire soon. The date on the I-94 will be limited to 6 months before the passport's expiration (or, for passports of countries in the "6-month club", which includes India, the date on the I-94 will be limited to the passport's expiration date).
So if you do not have a new passport at the time you enter the US, expect to only be admitted until your passport's expiration date. But if you already have a new passport valid for many years, and you are using it in conjunction with the visa on the old passport, you should be admitted until your H1b petition's expiration date.
Your passport renewal is not relevant to your immigrant petition or Adjustment of Status.