Creating a dedicated grub partition before installing ubuntu
Solution 1:
Another option is to make a dedicated Grub2 partition (as opposed to dedicated /boot
partition you mount at boot), see herman's tutorial.
Advantage: you can remove/install OSes at will.
Disadvantage: you need to edit the grub.cfg
file manually. To avoid having to do that after every kernel update I recommend using the link to kernel images, not the kernel image itself, for example use something like
linux /vmlinuz root=UUID=3e4xxxxx-027b-407c-ba1a-xxxxxxxx ro quiet splash
not
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=3e4xxxxx-027b-407c-ba1a-xxxxxxxx ro quiet splash
For more info on using symbolic links instead of full paths for kernel images look here.
Disadvantage2 (thanks psusi): when installing a new OS make sure you do not install its Grub image to MBR. Install it without Grub and then manually edit the grub.cfg
file to include the new OS.
Solution 2:
Only if we need the master boot record of a harddrive for something else we may install Grub to a partition. Otherwise it is not a good idea to do so.
During boot-up a boot manager such as Grub is expected on the boot device. That usually is the MBR of the hard drive (which is different to a partition), e.g. /sda
(not /sda1
).
During installation Grub2 will recognize other operating systems on all drives attached and adds them to the boot menu choice (this can also later be done with sudo update-grub
). The Windows boot manager does not do so - that is why we are unable to boot into Ubuntu when having installed Windows later.
There are several guides on how to partition your drives for dual booting, e.g. linked to in answers to this question (or more).
For recommendations on a separate /boot
partition see this question.