Score:1

How to reinstall GRUB on an LVM system?

gp flag

I have an old system installed Ubuntu 18.04 (desktop). It was partitioned /boot/efi on /dev/sda1, /boot on /dev/sda2, and / on /dev/sda3 (with LVM). The /boot partition was too small to install new packages. Therefore, I umounted the /boot and the /boot/efi partitions, and commented mounting /boot in /etc/fstab. Later, I reinstalled Ubuntu 20.04 on /boot, which is on the LVM volume.

The installation was successful. However, when I reboot the system, it boots the old /boot partition with the old kernel.

Summary:

  1. /dev/sda1 is the old /boot/efi partition and /dev/sda2 is the old /boot partition.
  2. New kernels are installed on /boot on an LVM volume.
  3. The bootloader always boots the old /boot partition first.

How to boot with the new kernel? Should I type the commands:

sudo grub-install /dev/sda

I worry that the grub might be installed with the old kernel or break my GRUB menu. Besides, I should remove the old /boot/efi in /etc/fstab.

Thanks a lot!

Appendix:

lsblk

sda                       8:0    0   1.8T  0 disk
├─sda1                    8:1    0   512M  0 part
├─sda2                    8:2    0   488M  0 part
└─sda3                    8:3    0   1.8T  0 part
  ├─gs--vg-root         253:0    0     9T  0 lvm  /
  └─gs--vg-swap_1       253:1    0 127.9G  0 lvm  [SWAP]

/etc/fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/gs--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
#UUID=d053f15f-12bc-4ae4-96e5-8d28aeb997ed /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sda1 during installation
#UUID=7D6D-081F  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/gs--vg-swap_1 none            swap    sw              0       0
UUID=7D6D-081F  /boot/efi       vfat    defaults      0       1
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.