when I execute the following command a error message appears:
sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'
I am using my ubuntu in a persitent usb mode.
How I could fix this error?
I just want to modify the file /etc/default/grub, in particular the following line
GRUB_CMDLINE_LINUX_DEFAULT=""
"persitent usb mode" means you are using a LiveUSB's "Try Ubuntu" environment, not an installed version of Ubuntu.
The bootloader (GRUB) on a LiveUSB is read-only, even with persistence enabled.
GRUB loads even before the kernel, and well before the filesystems are mounted. Writable files on a persistent LiveUSB can be only in one of those later-mounted filesystems. They are useless for GRUB changes -- they load too late. To make changes to GRUB, you would need to remake the entire LiveUSB image, which is not easy.
It would be much simpler to use an installed release of Ubuntu on a USB stick. That GRUB would be writable.