The synthesis of 2-hydroxy analogues of castanospermine from two new iminooctitols via Mitsunobu cyclization is described. The iminooctitols were derived from the dihydroxylation of an allyl alcohol intermediate, obtained by adding vinylmagnesium bromide to the C6-aldehyde of a protected 1-deoxynojirimycin. An orthogonally protected hemiacetal with silyl group at the C6-hydroxy position and remaining as benzyl ethers, synthesized in four steps from d-glucose, served as a building block in the synthesis of the 1-deoxynojirimycin intermediate.