And Jacob lived: Why is this section [completely] closed? Because, as soon as our father Jacob passed away, the eyes and the heart of Israel were “closed,” (i.e., it became “dark” for them) because of the misery of the slavery, for they (the Egyptians) commenced to subjugate them. Another explanation: That he (Jacob) attempted to reveal the End [of the exile] to his sons, but it was“closed off” (concealed) from him. [This appears] in Gen. Rabbah (91:1).

29When the time drew near for Israel to die, he called his son Joseph and said to him, "If I have now found favor in your eyes, now place your hand beneath my thigh, and you shall deal with me with lovingkindness and truth; do not bury me now in Egypt.

When the time drew near for Israel to die: Everyone of whom it is stated [that his days] drew near to die, did not attain the life span of his forefathers. [Isaac lived 180 years, and Jacob lived only 147 years. In connection with David, the expression of drawing near is mentioned (I Kings 2:1). His father lived 400 years, and he lived 70.]- [from Gen. Rabbah 96:4]

he called his son Joseph: The one who had the ability to do it. - [from Gen. Rabbah] 96:5.

ויקרא לבנו ליוסף: למי שהיה יכולת בידו לעשות:

now place your hand beneath my thigh: And swear. — [from Pirkei d’Rabbi Eliezer ch. 39] As explained in the narrative of Abraham and Eliezer (Gen. 24:2), he meant that Joseph should swear by covenant of the circumcision.

שים נא ידך: והשבע:

lovingkindness and truth: Lovingkindness that is done with the dead is true lovingkindness, for one does not expect any payment or reward. — [from Gen. Rabbah 96:5]

חסד ואמת: חסד שעושין עם המתים הוא חסד של אמת, שאינו מצפה לתשלום גמול:

do not bury me now in Egypt: [Because] its soil is destined to become lice (which will crawl under my body), and because those who die outside the [Holy] Land will not be resurrected except with the pain of rolling through underground passages. [Also] so that the Egyptians will not deify me. — [from Gen. Rabbah 96:5, Keth. 111a]

I will lie with my forefathers: Heb. וְשָׁכַבְתִּי, lit., and I will lie. This“vav” (of וְשָׁכַבְתִּי) is connected to the beginning of the previous verse: “Place now your hand beneath my thigh and swear to me, for I am destined to lie with my forefathers, and you shall carry me out of Egypt.” We cannot say, however, that “I will lie with my forefathers” means: Lay me to rest with my forefathers in the cave, because afterwards it is written: “and you shall carry me out of Egypt, and you shall bury me in their grave.” Moreover, we find everywhere that the expression “lying with one’s forefathers” denotes expiration, not burial, as in “And David lay with his forefathers,” and afterwards, “and he was buried in the city of David” (I Kings 2:10).

and Israel prostrated himself: [Although the lion is king] when it is the time of the fox, bow down to him. — [from Meg. 16b]

וישתחו ישראל: תעלא בעידניה סגיד ליה:

on the head of the bed: He turned around to the side of the Shechinah (Gen. Rabbah, Vatican ms. no. 60). From here [the Sages] deduced that the Shechinah is at the head of a sick person (Shab. 12b). Another explanation: עַל רֹאשׁ הַמִטָה - [He prostrated himself to God] because his offspring were perfect, insofar as not one of them was wicked, as is evidenced by the fact that Joseph was a king, and furthermore, that [even though] he was captured among the heathens, he remained steadfast in his righteousness. — [from Sifrei Va’ethannan 31, Sifrei Ha’azinu 334]

that [someone] said to Joseph: One of the tellers, and this is an elliptical verse. Some say, however, that Ephraim was accustomed to study with Jacob, and when Jacob became ill in the land of Goshen, Ephraim went to his father to Egypt to tell him.

And [someone] told: The teller [told] Jacob, but [the text] does not specify who [it was], and many [Scriptural] verses are elliptical.

ויגד: המגיד ליעקב, ולא פירש מי, והרבה מקראות קצרי לשון:

And Israel summoned his strength: He said, “Although he is my son, he is a king; [therefore,] I will bestow honor upon him” [Midrash Tanchuma Vayechi 6]. From here [we learn] that we must bestow honor upon royalty, as Moses bestowed honor upon royalty, [as it is written, that Moses said to Pharaoh,] “Then all these servants of yours will come down to me” (Exod. 11:8), [rather than “You will come down to me”]. And so Elijah [also bestowed honor upon royalty, as it is written]: “And he girded his loins [and ran before Ahab until coming to Jezreel]” (I Kings 18:46). - [from Mechilta Beshallach Section 13]

4And He said to me, 'Behold, I will make you fruitful and cause you to multiply, and I will make you into a congregation of peoples, and I will give this land to your seed after you for an everlasting inheritance.'

and I will make you into a congregation of peoples: He announced to me that another congregation of peoples was to be descended from me. Although he said to me, “A nation and a congregation of nations [shall come into existence from you]” (Gen 35:11) [meaning three nations], by “a nation,” He promised me [the birth of] Benjamin. “A congregation of nations” means two in addition to Benjamin, but no other son was born to me. Thus I learned that one of my tribes was destined to be divided [in two]. So now, I am giving you that gift. — [from Pesikta Rabbathi ch. 3]

But your children: If you have any more [children], they will not be counted among my sons, but will be included among the tribes of Ephraim and Manasseh, and they will not have a [separate] name like [each of] the [other] tribes as regards the inheritance. Now, although the land [of Israel] was divided according to their heads (the population of each tribe), as it is written: “To the large [tribe] you shall increase its inheritance” (Num. 26:54); and each man received an equal share, except for the firstborn. Nevertheless, only these (Ephraim and Manasseh) were called tribes [regarding the ability] [to cast a lot in the land according to the number of names of the tribes and [regarding having] a prince for each tribe, and groups [of tribes in the desert] for this one and for that one]. [Note that the bracketed material does not appear in early editions of Rashi.]

7As for me, when I came from Padan, Rachel died to me in the land of Canaan on the way, when there was still a stretch of land to come to Ephrath, and I buried her there on the way to Ephrath, which is Bethlehem."

As for me, when I came from Padan, etc.: Although I burden you to take me to be buried in the land of Canaan, and I did not do so to your mother, for she died close to Bethlehem. — [from Targum Jonathan ben Uzziel]

a stretch of land: Heb. כִּבְרַת-אֶרֶץ, a measure of land, which is two thousand cubits, equivalent to the measure of the Sabbath boundary (the distance a person may walk on the Sabbath), according to the statement of Rabbi Moshe Hadarshan. [The preceding material should be considered parenthetic. The following is Jacob’s explanation of why he did not bury Rachel in the cave of Machpelah.] You should not say that the rains prevented me from transporting her and burying her in Hebron, [for] it was the dry season, when the earth is riddled and full of holes like a sieve (כְּבָרָה) .

and I buried her there: And I did not take her even to Bethlehem to bring her into the Land (i.e., into the inhabited region of the Holy Land- [Sifthei Chachamim]), and I know that you hold it against me; but you should know that I buried her there by divine command, so that she would be of assistance to her children. When Nebuzaradan exiles them (the Israelites), and they pass by there, Rachel will emerge from her grave and weep and beg mercy for them, as it is said: “A voice is heard on high, [lamentation, bitter weeping, Rachel is weeping for her children]” (Jer. 31:14). And the Holy One, blessed be He, answers her, “‘There is reward for your work,’ says the Lord,… ‘and the children shall return to their own border’” (ibid. verses 15, 16) (Pesikta Rabbathi ch. 3). Onkelos, however, renders [כִּבְרַת-אֶרֶץ as] כְּרוּב אַרְעָא, [meaning:] the measure of plowing in a day [Other editions: [a measure of plowing] of land], and I say that they (people in Biblical times) had a measurement called one full furrow, caruede in Old French, [which is] a land measure, plowed land, as we say:“He plows (כָּרִיב) and plows again” (B.M. 107a);“As much as a fox picks up [on its feet] from a plowed field (מִבֵּי כַּרְבָּא)” (Yoma 43b).

Then Israel saw Joseph’s sons: He attempted to bless them, but the Shechinah withdrew from him because of Jeroboam and Ahab, who were destined to be born from Ephraim, and Jehu and his sons, [who were destined to be born] from Manasseh. — [from Tanchuma Vayechi 6] [Jeroboam the son of Nebat, the first king of the Northern Kingdom, and Ahab the son of Omri were notorious idolaters.]

here: Heb. בָּזֶה, lit., in this, or with this. He (Joseph) showed him (Jacob) the document of betrothal and the kethubah , and Joseph prayed for mercy concerning the matter, and the Holy Spirit [returned and] rested upon him (Jacob). - [from Kallah Rabbathi 3:19]

So he said, “Now bring them near to me, so that I may bless them.”: This is what Scripture [is referring to when it] states:“And I (the Holy One) trained it into Ephraim; he took them on his arms” (Hosea 11:3). I trained My spirit into Jacob for Ephraim’s sake, and he took them upon his arms. — [from Tanchuma Vayechi 7]