Résumé : We generalize our earlier work on neutron stars, which assumed spherical Wigner-Seitz cells in the inner crust, to admit the possibility of pasta phases, i.e., nonspherical cell shapes. Full fourth-order extended Thomas-Fermi (ETF) calculations using the density functional BSk24 are performed for cylindrical and platelike cells. Unlike in our spherical-cell calculations we do not include shell and pairing corrections, but there are grounds for expecting these corrections for pasta to be significantly smaller. It is therefore meaningful to compare the ETF pasta results with the full spherical-cell results, i.e., with shell and pairing corrections included. However, in view of the many previous studies in which shell and pairing corrections were omitted entirely, it is of interest to compare our pasta results with the ETF part of the corresponding spherical calculations. Making this latter comparison, we find that as the density increases the cell shapes pass through the usual sequence sphere → cylinder → plate before the transition to the homogeneous core. The filling fractions found at the phase transitions are in close agreement with expectations based on the liquid-drop model. On the other hand, when we compare with the full spherical-cell results, we find the sequence to be sphere → cylinder → sphere → cylinder → plate. In neither case do any “inverted,” i.e., bubblelike, configurations appear. The analytic fitting formulas for the equation of state and composition that we derived in our earlier work, with the assumption of spherical cell shapes for the entire density range from the outer crust to the core of a neutron star, are found to remain essentially unchanged for pasta shapes. Here, however, we provide more accurate fitting formulas to all our essential numerical results for each of the three phases, designed especially for the density range where the nonspherical shapes are expected, which enable one to capture not only the general behavior of the fitted functions but also the differences between them in different phases.