Was trying to tweak a menu entry and in an effort to get it to work I deleted all contents of /etc/grub.d
. Is there a way I can easily restore it? This question has to be a duplicate by now so if someone can redirect me to an answer that too would be great. :)
1 Answer
Boot with your Live USB / DVD.
Open Nautilus in root mode using:
sudo -H nautilus
Then navigate to your /etc
directory and copy the grub.d
directory.
While still in nautilus
root mode navigate to your real /etc
directory on your hard drive SSD and paste the grub.d
directory into it.
Note: You may have to mount your real Ubuntu first if nautilus
doesn't see it on the hard drive / SSD: How to mount a partition from live usb
-
1Right, so I did what you suggested, and updated grub by chrooting to where I mounted the partition that had grub installed from the live USB. It only detected Windows though, not Ubuntu. Aug 28, 2018 at 1:42
-
Um... you don't use chroot. Only mount it so you can copy to it. You should still be rooted to Live USB... Aug 28, 2018 at 1:44
-
Offtopic: running into another issue: “failed to get canonical path of `/cow'. The solutions given to me by looking at other stackexchange threads aren’t working. Looking into more solutions Aug 28, 2018 at 2:01
-
Um "CoW" means Copy On Write (deals with dirty disk buffers or something). "COW" can also mean "Cow-Say" which is a gimmic CLI program and probably not that. Don't really know sorry. Aug 28, 2018 at 2:02
-
Found nothing of use. I really don’t understand what’s going wrong, /etc/grub.d has 10_linux so there’s no reason why only the os prober should work. Aug 28, 2018 at 2:38
/etc/grub.d
directory and not missing all of grub.