I finally found the correct and stable way for creating custom ubuntu distros.
Clone this Git repo:
https://github.com/Distroshare/distroshare-ubuntu-imager.git
Edit the
distroshare-ubuntu-imager.config
file inside it and change the destination directory of the created ISO if you want.Run the script inside it using
sudo ./distroshare-ubuntu-imager.sh
and it will create the ISO for you as specified in the config file.Use
Unetbootin
to create bootable USB and VIOLA! You are done!
Now install this Custom Distro by booting through your USB.