Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
50
rated 0 times [  50] [ 0]  / answers: 1 / hits: 227755  / 2 Years ago, mon, june 6, 2022, 1:43:23

I have booted from a live USB ("Try Ubuntu"), that also has a persistent option set (I used LiLi to create one) to do some tests for this pcie hotplug issue I'm having.



I'm trying to test some boot paramaters (like in this question) by doing this



sudo nano /etc/default/grub
sudo update-grub


The problem is that that last command gives me this:



/usr/sbin/grub-probe: error: failed to get canonical path of /cow.


It looks like /cow is the file-system that is mounted on /, according to:



:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/cow 4056896 2840204 1007284 74% /
udev 1525912 4 1525908 1% /dev
tmpfs 613768 844 612924 1% /run
....


Is there a way for me to run update-grub?


More From » grub2

 Answers
3

You'll need to do a bit of remounting and remapping.



After booting the liveCD, we'll mount the Ubuntu partition to /mnt with:



sudo mount /dev/sd*# /mnt


where /dev/sd*# is updated to your Ubuntu partition.



If you have a separate /boot partition, we'll need to mount it in /mnt/boot as well:



sudo mount /dev/sd*# /mnt/boot


where /dev/sd*# is updated to your /boot partition.



This should mount it with enough access to get the canonical path if needed, but we'll likely not need this.



To finish up, just update grub with the correct root and target:



sudo grub-install --root-directory=/mnt /dev/sdX


where /dev/sdX is the disk(not the partition) where we want GRUB.


[#34643] Tuesday, June 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byishted

Total Points: 469
Total Questions: 113
Total Answers: 113

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
;