When searching for solutions on Google, many of them suggest creating a file using the code below, but it didn't work for me:#
sudo update-grub || sudo grub2-mkconfig -o /boot/grub2/grub.cfg
On my machine, which is an Amazon EC2 free instance, I couldn't solve the problem using the above code. However, I was able to solve it using another DD script below:
wget -N --no-check-certificate https://down.vpsaff.net/linux/dd/network-reinstall-os.sh && \
chmod +x network-reinstall-os.sh && ./network-reinstall-os.sh
The default username is: root, and the password is: IdcOffer.com
I hope this can help you if you are DDing the system.
Just a reminder, the SSH connection will be disconnected during the installation process, which usually takes about half an hour (so it's not a loss of connection). During this time, you can check the installation process through the online SSH provided by the cloud service provider. If you don't have it, just wait patiently for more than half an hour and then reconnect via SSH.