Parshat Vayechi opens with Yaakov's request that Yosef have him buried in Canaan and Yosef's swearing in the affirmative. The following Pasukim, from 48:1-25, detail the event of Yaakov's blessing of Efraim and Menashe. Several puzzling phenomenon in this account color the entire story.
First, throughout the passage Yaakov continuously emphasizes superfluous geographical facts. Specifically, Yaakov points out the (obvious) situation of Luz, where God appeared to him, in Eretz Canaan, and the fact that Rachel's death occurred in Canaan - "And I buried her there on the road to Efrat, which is in Beit Lechem." Yaakov also makes mention that Yosef's two sons, "who were born to you in Egypt," are to be blessed; however, this modifier on "sons" is unnecessary, since Yosef only has two sons.
The second aspect of this section is the exchange between Yaakov and Yosef. In 18:5, Yaakov states, "And now, your two sons who were born to you in Egypt shall be mine like Reuven and Shimon." Yet, in 48:8, responding to Yaakov's question "whose are these?" Yosef says "they are my sons whom God has given me here.
Rabbi Zvi Grumet, in response to these details, offers the explanation that what is documented here is the struggle between Yaakov and Yosef over where the future of Bnai Yisrael lays. Yosef, having been away from Eretz Canaan since he was seventeen, lacks the fundamental connection with the land as an integral facet of the destiny of Am Yisrael. He envisions the fulfillment of God's promise to take place elsewhere, perhaps in Egypt, an economically secure country. Yet Yaakov clearly feels attached to Eretz Canaan. He recognized the distinction between Canaan and Egypt, and he was afraid to leave his homeland (46:3-4).
Therefore, before his death Yaakov is desperate to ensure that his descendants will return to Canaan. Strengthening himself (48:2), he prepares for the battle with Yosef. Yaakov continuously emphasizes that God's promises and Bnai Yisrael's history (and the death of Yosef's mother, Rachel) took place in Canaan, and that would be where the nation's future would develop - "And they shall flourish abundantly like fish within the land." Yaakov claims the children of Yosef as his own, destined to fulfill the role of being Yaakov's descendants, enveloped in Yaakov's perceptions and dreams. The result? 50:24-25 - "Yosef said 'God will surely bring you up to the land that He swore... then you must bring my bones up out of here.'"
I would like to suggest that this is the meaning of the opening Pasuk of our Parsha - "And Yaakov lived in Egypt for seventeen years..." The little connection Yosef has with Canaan, in which he lives for seventeen years (37:2), is parallel to Yaakov's feelings of being a stranger in Mitzraim, in which he dwelled for seventeen years.