Synthesis of 1,2-cis-homoiminosugars derived from GlcNAc and GalNAc exploiting a β-amino alcohol skeletal rearrangement.