We study the dynamics of a single two-dimensional elliptical particle sedimenting in a Newtonian fluid using numerical simulations. The main emphasis in this work is to study the effect of boundaries on the flow patterns observed during sedimentation. The simulations were performed using a multi-block lattice Boltzmann method as well as a finite-element technique and the results are shown to be consistent. We have conducted a detailed study on the effects of density ratio, aspect ratio and the channel blockage ratio on the flow patterns during sedimentation. As the channel blockage ratio is varied, our results show that there are five distinct modes of sedimentation: oscillating, tumbling along the wall, vertical sedimentation, horizontal sedimentation and an inclined mode where the particle sediments with a non-trivial orientation to the vertical. The inclined mode is shown to form a smooth bridge between the vertical and horizontal modes of sedimentation. For narrow channels, the mode of sedimentation is found to be sensitively dependent on the initial orientation of the particle. We present a phase diagram showing the transitions between the various modes of sedimentation with changing blockage ratio of the channel.