by

Fix Grub

sudo dd bs=4M if=Downloads/ubuntu-19.04-desktop-amd64.iso of=/dev/sdb conv=fdatasync
  • connect to the internet
  • install boot-repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
  • run boot-repair and apply the default configuration

GRUB settings are stored in the /etc/default/grub file. Edit this file to change GRUB2’s settings. Scripts are also located in the /etc/grub.d/ directory. For example, on Ubuntu, there are scripts here that configure the default theme. There’s also an os-prober script that checks the system’s internal hard drives for other installed operating systems — Windows, other Linux distributions, Mac OS X, and so on — and automatically add them to GRUB2’s menu.

When you run the update-grub command, GRUB automatically combines the settings from the /etc/default/grub file, the scripts from the /etc/grub.d/ directory, and everything else, creating a /boot/grub/grub.cfg file that’s read at boot.

In other words, to customize your GRUB2 settings, you’ll have to edit the /etc/default/grub file and then run the sudo update-grub command.

sudo grub-install /dev/nvme0n1
sudo update-grub

For more info, feel free to read the following article: https://www.howtogeek.com/196655/how-to-configure-the-grub2-boot-loaders-settings/

Write a Comment

Comment