Making adjustments to a non functioning ubuntu install
Boot with a live CD or live USB. Assuming that your install is availableat /dev/sda1, then, quoted from:
http://askubuntu.com/questions/112957/display-works-fine-in-livecd-but-not-in-full-installation
sudo mkdir -p /media/ubuntu
sudo mount /dev/sda1 /media/ubuntu
Then you need to mount the proc, dev, and sys filesystems into your new environment:
sudo mount --bind /dev /media/ubuntu/dev
sudo mount --bind /proc /media/ubuntu/proc
sudo mount --bind /sys /media/ubuntu/sys
Finally, chroot into it:
sudo chroot /media/ubuntu
Now edit /etc/default/grub, uncommenting out the line
GRUB_GFXMODE=640x480
and then run
sudo update-grub