I found some of commands more helpful fixing an issue while ubuntu OS was not starting.
Get in to ubuntu recovery mode (Keep pressing shift key while system start)
If in terminal you are not able to execute any command because its read only
then type this command to r/w – mount -o remount /
Check in boot.log file (var/log) for error it generates. command to check type tail -f boot.log
And I found it’s something send mail service is generating error and system stuck there loading OS
In terminal window type – sudo initctl list (To check all the processes running)
To check the ports in use command – cat /etc/services
To check which of the application using port 80
cat /etc/services | grep 80
To check definitive open ports on this server
sudo netstat -lnp –tcp –udp
To stop sendmail while system starts command is sudo update-rc.d sendmail disable
Now reboot the system with command – sudo shutdown -r now
System starts like charm