Thursday, July 28, 2016

How do I update grub to grub2 if legacy grub is installed in boot partition sector, not MBR?



I'm trying to move to grub2 and while chainloading from legacy grub works fine, I'm not sure how to move completely. Old grub was installed in boot sector of swap partition, /dev/sda3, and was working fine there. I want new grub to be installed there as well but during upgrade-from-grub-legacy it suggest to install at MBR or at ubuntu root partition, /dev/sda4. How do I force it to install at /dev/sda3? Can I just do grub-install '(hd0,3)' instead of upgrade-from-grub-legacy?



If you have verified that the new grub2 setup works, you can use grub-install safely.



The only significant thing upgrade-from-grub-legacy does is this:



rm -f /boot/grub/{{xfs,reiserfs,e2fs,fat,jfs,minix}_stage1_5,stage{1,2}}



which essentially removes the grub-legacy files from /boot/grub, you can also remove /boot/grub/menu.lst if it doesn't contain anything important to you.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...