PDA

View Full Version : [ubuntu] Upgrade ubuntu 7.1 to 8.04 preserve grub in /boot



katapita
September 13th, 2008, 02:51 AM
I have a dual boot system (Vista + Ubuntu).
I have grub installed in the first sector of the root (/) partition and not
in the MBR. I have modified the vista bootloader with EasyBCD to allow me to boot into Vista or Linux.
Will this be preserved when I upgrade ?
Updates to 7.1 including the kernel update did not mess this.
Will grub be installed in the MBR by default when I upgrade ?
Is there a way to prevent it during the upgrade ?
Thanks.

caljohnsmith
September 13th, 2008, 04:06 PM
I have a dual boot system (Vista + Ubuntu).
I have grub installed in the first sector of the root (/) partition and not
in the MBR. I have modified the vista bootloader with EasyBCD to allow me to boot into Vista or Linux.
Will this be preserved when I upgrade ?
Updates to 7.1 including the kernel update did not mess this.
Will grub be installed in the MBR by default when I upgrade ?
Is there a way to prevent it during the upgrade ?
Thanks.
You should be perfectly OK with the upgrade; upgrading will not touch your MBR. But if you want to give yourself a warm fuzzy feeling knowing that you have a backup of the MBR in case something happens, you can back up the MBR with:

sudo dd if=/dev/sda bs=512 count=1 > ~/Desktop/MBR.bin
If your HDD is not sda, you'll need to change that, otherwise the above command will save a copy of your MBR to your desktop. :)

katapita
September 13th, 2008, 04:16 PM
You should be perfectly OK with the upgrade; upgrading will not touch your MBR. But if you want to give yourself a warm fuzzy feeling knowing that you have a backup of the MBR in case something happens, you can back up the MBR with:

sudo dd if=/dev/sda bs=512 count=1 > ~/Desktop/MBR.bin
If your HDD is not sda, you'll need to change that, otherwise the above command will save a copy of your MBR to your desktop. :)
Thanks for the backup plan. In case of a problem how would I restore the MBR (512 bytes?)

caljohnsmith
September 13th, 2008, 04:29 PM
Thanks for the backup plan. In case of a problem how would I restore the MBR (512 bytes?)
If at some point you want to restore the MBR, it is important to keep in mind that the first 446 bytes of the MBR are the boot loader portion, and the remaining bytes are for the HDD's partition table. In most cases you will just want to restore the MBR boot loader, and not the partition table, because you might have changed your HDD's partition scheme since you last saved your MBR. Therefore, to just restore the boot loader you would do:

sudo dd if=/path/to/MBR.bin of=/dev/sda bs=446 count=1
Again, make sure you use the correct HDD if it isn't sda.