Moed Katan, Chapter One, Mishnah Six
It was certainly permitted to bury the dead on the festival. It would hardly be possible or desirable to wait an entire week to buy a body. Since burials would have taken place quite frequently during a festival, this mishnah deals with the critical subject of digging graves and other various places to bury or place the body.
1) They may not dig burial niches and graves during the festival.
a) But they may adapt burial niches [to the size of the dead body] during the festival.
2) And they may make a temporary grave during the festival, and a coffin, if a dead [body] is close by in the courtyard.
a) Rabbi Judah forbids, unless there are sawn boards at hand.
Section one: Burial niches are holes the walls of caves where they used to bury people. Graves refers to the caves themselves. These may not be dug on the festival because it is a tremendous amount of work and there are other ways to bury a dead body, such as digging a hole in the ground, which is permitted if necessary (see below). However, if there was already a niche in the wall of the burial cave and all they needed to do was expand it to make it fit the size of the body, they may do so because it is not a significant amount of work. Also, it would have been difficult, if not impossible to know how big to make the niches ahead of time.
Section two: They may make a temporary grave, one in which they would put the body until the bones are collected. They may also make a coffin if there is a dead body in the courtyard where the coffin is being built. If there is no dead body there then they may not make a coffin because people will not realize that it is being made for somebody who has already died. This is another criterion with regard to permitting work on the festivalwe must take into consideration what people will think when they see the person working. If they realize that it was for an imminent need, and that the work cannot be pushed off, then it is more likely to be permitted.
As an aside, we can see from this mishnah that some people were buried in coffins but not all. It seems that there was quite a large range of burial practices in Israel during mishnaic times.
Rabbi Judah says that it is prohibited to make the coffin if in order to do so he will also have to make planks. In other words, despite the fact that this is an immediate need, Rabbi Judah still prohibits it because making planks is too much work to be done on the festival. Only if he had available planks could he make the coffin.