1

I'm trying to update grub on my live usb and I get the following error:

ubuntu@ubuntu:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.

Any ideas? Nothing I have found yet on the net has worked.

Here is details of my mount points:

/cow            872M   62M  766M   8% / 
udev            930M  4.0K  930M   1% /dev
tmpfs           189M  1.1M  188M   1% /run
/dev/sdb1       1.9G  1.9G   31M  99% /cdrom  # <- this is the USB I'm using
/dev/loop0      939M  939M     0 100% /rofs
none            4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs           942M  4.0K  942M   1% /tmp
none            5.0M     0  5.0M   0% /run/lock
none            942M   76K  942M   1% /run/shm
none            100M   44K  100M   1% /run/user

1 Answers1

0

You can't update-grub of a liveUSB with persistence. You have to modify the config file from another computer running linux (or windows, if you've got good command line knowledge with Cygwin).

Running update-grub while using /cow (which is a casper filesystem on your USB mounted as / in your setup) will have it try to update the grub entries of the root partition, which isn't actually where grub runs from in the case of a liveUSB. It runs from a device other than /cow, then changes into /cow for your usage.

Ostensibly, you could chroot into the /rofs loop device (loop means the filesystem is in a literal file instead of a physical disk), as running update-grub there would actually update the grub of the file used to run the liveUSB enviroment.

Unfortunately, the image used here isn't updateable as it's mounted write-only (as it should be! You don't want temporary filesystems modifying themselves). I'd recommend you try using two USBs, one with the live disk, and the other to install to. Make sure you disconnect the hard drive of the computer you use, to avoid grub (or worse, the whole linux system you're trying to install) from installing over whatever bootloader is already there.

Source: I've been trying in vain to do just what I imagine you were trying to do, and have learned a lot along the way.

  • I have been trying to modify the grub from the other live USB (Blade) but have so far failed. I have 5 partitions on my persistent live USB (SanDisk). When I try to mount SanDisk while running Ubuntu off Blade, I'm unable to chroot to SanDisk, which does not allow me to run update-grub. There was one answer saying to modify the isolinux.cfg file in SanDisk, but I don't know what to do there – user117913 May 08 '18 at 13:33