"When the time drew near that Israel must die, he called his son Joseph and said to him, 'Now if I have found favor in your sight, please put your hand under my thigh, and deal kindly and truly with me. Please do not bury me in Egypt, but let me lie with my fathers; you shall carry me out of Egypt and bury me in their burial place'" (Gen. 47:29,30). Joseph agreed and swore to him that he would bury him with his fathers.
"Now it came to pass after these things that Joseph was told, 'Indeed your father is sick'; and he took with him his two sons, Manasseh and Ephraim" (48:1). Jacob, after learning that Joseph was coming to visit, collected his strength and sat up in bed. Jacob then recounted some history to his son, including the nation and land promises. Then Jacob said - "And now your two sons, Ephraim and Manasseh, who were born to you in the land of Egypt before I came to you in Egypt, are mine; as Reuben and Simeon, they shall be mine. Your offspring whom you beget after them shall be yours; they will be called by the name of their brothers in their inheritance" (48:5,6). Jacob is going to adopt Ephraim and Manasseh as his own sons, thus essentially giving Joseph the double portion of his inheritance. Interestingly, had Laban not been deceptive on Jacob's wedding night, Joseph would have been the firstborn son anyway. If Joseph were to have other sons, they would be counted under these two for their inheritance.
"Then Israel saw Joseph's sons, and said, 'Who are these?' And Joseph said to his father, 'They are my sons, whom God has given me in this place.' And he said, 'Please bring them to me, and I will bless them.' Now the eyes of Israel were dim with age, so that he could not see. Then Joseph brought them near him, and he kissed them and embraced them. And Israel said to Joseph, 'I had not thought to see your face; but in fact, God has also shown me your offspring!'" (Gen. 48:8-11).
Jacob's final years were characterized with joy in being able to see Joseph and his sons. In regards to Israel asking who the boys were, some attribute it to the poor eyesight, based on Joseph's reply. However, others believe he hadn't seen them in awhile and did not initially recognize them. This may be similar to what a grandparent might say to a grandchild seen infrequently: "My how you've grown!"
"So Joseph brought them from beside his knees, and he bowed down with his face to the earth. And Joseph took them both, Ephraim with his right hand toward Israel's left hand, and Manasseh with his left hand toward Israel's right hand, and brought them near him. Then Israel stretched out his right hand and laid it on Ephraim's head, who was the younger, and his left hand on Manasseh's head, guiding his hands knowingly, for Manasseh was the firstborn" (48:12-14). It was tradition to put one's right hand on the firstborn's head, and Joseph placed his sons so that his firstborn, Manasseh, was at Jacob's right hand. However, Israel intentionally crossed his arms and placed his right hand on Ephraim instead! Israel then blesses the boys and formally adopts them for inheritance purposes.
"Now when Joseph saw that his father laid his right hand on the head of Ephraim, it displeased him; so he took hold of his father's hand to remove it from Ephraim's head to Manasseh's head. And Joseph said to his father, 'Not so, my father, for this one is the firstborn; put your right hand on his head.' But his father refused and said, 'I know, my son, I know. He also shall become a people, and he also shall be great; but truly his younger brother shall be greater than he, and his descendants shall become a multitude of nations'" (Gen. 48:17-19).
On that day Israel set Ephraim before Manasseh and he also told Joseph - "Behold, I am dying, but God will be with you and bring you back to the land of your fathers. Moreover I have given to you one portion above your brothers, which I took from the hand of the Amorite with my sword and my bow" (48:21,22). This final verse is ambiguous, but I believe John 4:5 sheds some light upon it. It appears that Jacob also here gave Joseph a special portion of land. It is unclear whether the gift was given literally or prophetically at that moment.