Linux笔记

服务开机启动:update.rc postgresql enable;

###开机进入emergency mode,首先检查/etc/fstab文件内容是否有错误

###重新安装grub efi引导

Reinstall the GRUB boot loader to your Ubuntu installation in EFI mode this way …

Boot from the Ubuntu installation medium and select ‘Try Ubuntu without installing’.
(Boot your install medium in EFI mode, select the Ubuntu entry with UEFI in front.)

Once you are on the Live desktop, open a terminal and execute these commands :

sudo mount /dev/sdXXX /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub

Note : sdX = disk | sdXX = efi partition | sdXXX = system partition

To identify the partitions use GParted, the tool is included in the installation medium.
After having run the commands GRUB will be installed in the separate EFI partition.

原文地址:https://askubuntu.com/questions/831216/how-can-i-reinstall-grub-to-the-efi-partition