To install grub2, you must install the following package: grub-pc. grub-common can be found in the package management tool. Grub-install-v to check the current version. The traditional grub version is 0.97 or below, and the grub2 version is 1.96 or higher. The configuration file of grub2 is/boot/grub. cfg,
To install grub 2, you must install the following packages:
Grub-pc, grub-common
It can be found in the package management tool.
Grub-install-v to check the current version. The traditional grub version is 0.97 or below, and the grub2 version is 1.96 or higher.
The configuration file of grub 2 is/boot/grub. cfg, but this file cannot be modified. d/and/etc/default/grub files are edited, and update-grub is used to generate the configuration file.
That is to say, a normal process should be:
Sudo apt-get install grub-pc, grub-common # not required if grub2 is already installed
Sudo grub-install -- root-directory = // dev/sda # install grub2 boot on the device
Sudo update-grub # generate the grub configuration file
The current problem lies in update-grub, because grub-install can be installed by a specified device, but update-grub in the generated configuration file cannot be specified.
Whereis update-grub
Find it in the/usr/sbin/directory and edit it to make a shortcut to grub-mkconfig. The Code is as follows:
#! /Bin/sh
Set-e
Exec grub-mkconfig-o/boot/grub. cfg "$ @"