From interstellar dust to comets