Weird problem with USB ports in Linux

I am describing here the process I followed to solve the USB problem. But before that, I should let you know about another weird problem I have experienced while using a live USB. Today I have downloaded LMDE Mint and made a persistent live USB with 20GB for the Linux partition. Now the process:

  1. I entered the BIOS setup and enabled the ‘IOMMU Controller’;
  2. Now, I boot via live USB in UEFI mode and then my mouse and keyboard stopped responding which were connected in USB 3.0 ports. So, I figured that this time USB 3.0 ports are not responding.
  3. I reconnected the mouse and keyboard in USB 2.0 ports and they started working again. I think, enabling the ‘IOMMU Controller’ caused this problem though I don’t know why.
  4. Now, my mouse, keyboard, USB drive (live USB) and WI-FI dongle, all were connected in USB 2.0 ports and the boot into the live USB was successful.
  5. Now when I reached the no. 8 step of the Github tutorial and ran the command

grub2-mkconfig -o /boot/grub2/grub.cfg

and it showed:

Command ‘grub2-mkconfig’ not found, did you mean: command ‘grub-mkconfig’ from deb grub-common

  1. Then I ran this command:

grub-mkconfig -o /boot/grub2/grub.cfg

and it showed:

/user/sbin/grub-probe: error: failed to get canonical path of ‘overlay’

Now what to do?! I couldn’t find any solution which could solve this problem.