I'm on a Macbookpro with Ubuntu 16.04.

I changed my GRUB settings by editing the file /etc/default/grub and adding nomodeset and acpi_backlight=vendor.

After rebooting I got stuck at a purple screen where I couldn't do anything. I managed to access the GRUB shell by pressing shift + ESC, but from here I couldn't understand how to restore the settings file, since I couldn't use nano, vim or vi.

By using a bootable USB with Ubuntu I was able to edit the settings file, but I can't run


I get failed to get canonical path of /cow.

How can I tell GRUB to use the newly updated file from the GRUB shell?!


That error appears because when you are in a live session you are not interacting with your installed system, so you can't make changes like that in the usual way.

However, you can chroot into your installation to update grub, as explained in this answer

You need to know what your root and boot partitions are called. If you need to find out either use gparted or use output from

sudo blkid


sudo fdisk -l

And assume your root partition is the biggest one showing type=ext4 (we'll check this later). Your boot partition should show type=vfat or fat32 or be marked as boot partition. If you don't have a boot partition, you don't need to mount it.

Now mount the partitions. Here I assume the partitions you identified are dev/sda1 for boot and dev/sda2 for root. Replace the names as needed.

sudo mount /dev/sda2 /mnt

Now check you got the right partition with

ls /mnt

If you see what you'd expect to find in / eg lib etc bin sys var proc... then you got it right, so continue:

sudo mount /dev/sda1 /mnt/boot
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc

Now change the mounted partition to root:

sudo chroot /mnt

Now edit /etc/default/grub as before to take out those parameters you added. Now you can

sudo update-grub


sudo umount /mnt/dev
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/boot
sudo umount /mnt

And reboot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.