During Ubuntu installation, I pulled out the hard disk and installed it back today. After that, I tried to manually add the boot segment and failed to start it. Multiple times google found two commands to solve the problem. Sudosu # re-build the devicemap, and execute this command when the new hard disk is added. If this command is not run before, it is unable to be started. Grub-mkdevicemap # Automatic Detection System Update Profile update-grub2btw: the starting Number of the partition in grub2 changes from 0 to 1
During Ubuntu installation, I pulled out the hard disk and installed it back today. After that, I tried to manually add the boot segment and failed to start it. Multiple times google found two commands to solve the problem.
Sudo su
# Re-build the device map. to execute this command when you add the device to the hard disk, it is unable to start until you run this command.
Grub-mkdevicemap
# Automatic detection of system Update Configuration Files
Update-grub2
Btw: the start Number of the partition in grub2 is changed from 0 to 1, that is, root (hd1, 0) to root (hd1, 1.