If you put long-running commands in rc.local
, your startup will be delayed. You should send these to the background:
( fstrim -v /; fstrim -v /home ) &
That said, you probably don't have to do this yourself. Ubuntu 14.10 added a weekly job for fstrim
.
You can fix this in following way, it worked for me.
FYI : I had upgraded from 14.04 to 16.04.
Go in your safe mode by hitting SHIFT key or ESC.
select networking , then drop to root prompt. Then run following commands.
sudo apt-get remove plymouth
sudo apt-get remove xserver-xorg-video-intel
Now, reboot,
When you reboot, still you may get black or purple screen,
Press Ctrl+Alt+F1
and login with your username and password.
Then run following commands.
GDM ie Gnome display manager was also causing problems for me, so following step was essential for me
I switched to lightdm from gdm3 as display manager.
sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm
When you are prompted, select default display manager as lightdm
Now I was back with desktop , without dash or unity but only icons and wallpaper.
now run this.
sudo apt-get install ubuntu-desktop
Now, reboot after this.
The desktop is back!
now, you can install intel graphic drivers again,
sudo apt-get install xserver-xorg-video-intel
Reboot now.
Its done!
Best Answer
I fixed it myself. This is what I did
From the GRUB menu , I selected recovery mode
At the recovery menu , I selected the 'networking' option, and then root shell.
I then typed
At the prompt I selected 'lightdm'
And voila! Problem solved.