Context
I have a laptop with a SATA (sdb/hd1sdb/hd1) slot and an m.2 (sda/hd0sda/hd0) slot. I had an SSD on the hd0 slot with the boot and EFI partition, and an HHD on the hd1 with the //, /home/home and swapswap partitions on it.
I recently bought a bigger SSD to replace the old one. And when replacing it, I did a backup (using clonezilla) of all the partitions on the SSD, plus the /root/root partition on the HDD ; I then restored all those partitions on the new drive. I also kept the old // partition on the HDD in case a problem would occur.
I did those changes after the restore:
- On the /boot/grub.cfg
/boot/grub.cfgfile, I changed all the lines referencing the old /root/rootpartition (/dev/sdxn/dev/sdxn) or its UUID (UUID=[old partition's uuid]UUID=[old partition's uuid]) to reference the new one. - On /etc/fstab
/etc/fstab(on the new partition), I also changed all the UUID's of the old partitions to the new ones.
Problem
These changes allowed me to boot correctly on the new SSD, but after every update, the /boot/grub.cfg/boot/grub.cfg file goes back to referencing the old partition.
I am guessing that there's still some file responsible for generating the grub configuration that still has the old partition informations, but I can't manage to find it.