The best description for it is here:

I just want to add some notes to it with Ubuntu 16:

  • if you made standard installation and never changed grub settings then you can found that SHIFT command does not get you into grub menu – if so try to hold ESC on startup to get grub prompt
  • if grub prompt you have to follow steps described in link above – here are just some small hints:
    • plain “ls” command shows just disks
    • if you do not know in which partition your /boot directory is try
       set root=(hd0,1)
      ls /
      set root=(hd0,2)
      ls /

      etc… with all partitions until you will see right prompt – a lot of vmlinux-* files

    • after it continue with described commands:
      linux /boot/vmlinuz-4.2.0-16-generic root=/dev/sda3
      initrd /boot/initrd.img-4.2.0-16-generic

      of course with proper kernel version and sdaX number

    • if boot messages stop on some step here is your problem – you can try to restart and boot again with different version of the kernel until you will be able to boot normally