refactor and try to fix livecd-image-generation