When checking my cloned Ubuntu 14.04 LTS VM, I noticed that it still contained the volume group name from the original, which is of course not desired.
It seemed fairly simple, but I kept receiving an error with update-grub, reporting the old Volume Group name:
1 |
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/mapper/<Old VG>-root'. |
Steps to be done as root:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#Show the current VG name >vgs #Proof that it really is used >ls -als /dev/mapper/ #Do the rename >vgrename -v <old VG> <new VG> #Replace all references to the old VG with the new ones in fstab: >nano /etc/fstab #This will give an error as Ubuntu 14.04 LTS still finds the old VG name (no idea why) >update-grub #So, replace all references directly in the one that is going to be used in the next reboot >nano /boot/grub/grub.cfg #Be brave >reboot now #New session: #This command does nothing >update-grub #This shows that the VG really is renamed >ls -als /dev/mapper |
Share