2

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
  • Although technically a duplicate of: askubuntu.com/questions/88384/… the answer I posted below is a lot easier in your situation of only missing the /etc/grub.d directory and not missing all of grub. Aug 26, 2018 at 18:10

1 Answer 1

0

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

11
  • 1
    Right, 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.
    – Hugeblank
    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
    – Hugeblank
    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.
    – Hugeblank
    Aug 28, 2018 at 2:38

Not the answer you're looking for? Browse other questions tagged .