How to restore the MBR after do-release-upgrade?

Ralf Mardorf silver.bullet at zoho.com
Thu Jul 7 12:51:47 UTC 2016


Hi,

the    # do-release-upgrade    from Wily 15.10 to Xenial 16.04
installed the GRUB packages. There was no way to deny the installation.
I now try to get rid of GRUB, allegedly written to /dev/sda, by
restoring the MBR of all connected drives.

The dd command claims to be ok, but after running
 
  [root at moonstudio 2016-May]# dd if=MBR_SDA-20160506_155555.may_2_0_1_6 of=/dev/sda bs=512 count=1 
  1+0 records in
  1+0 records out
  512 bytes copied, 0.0138179 s, 37.1 kB/s
  [root at moonstudio 2016-May]# echo $?
  0
  [root at moonstudio 2016-May]# dd if=MBR_SDB-20160506_155555.may_2_0_1_6 of=/dev/sdb bs=512 count=1 
  1+0 records in
  1+0 records out
  512 bytes copied, 0.0181916 s, 28.1 kB/s
  [root at moonstudio 2016-May]# echo $?
  0
  [root at moonstudio 2016-May]# cd
  [root at moonstudio ~]# umount /dev/sdb14
  [root at moonstudio ~]# rmdir /mnt/data2/ 
  [root at moonstudio ~]# shutdown -r now

still the new Ubuntu GRUB menu appears. I tried several times, also

  [root at moonstudio 2016-May]# dd of=/dev/sda if=MBR_SDA-20160506_155555.may_2_0_1_6 bs=512 
  1+0 records in
  1+0 records out
  512 bytes copied, 0.016662 s, 30.7 kB/s
  [root at moonstudio 2016-May]# echo $?
  0
  [root at moonstudio 2016-May]# dd of=/dev/sdb if=MBR_SDB-20160506_155555.may_2_0_1_6 bs=512  
  1+0 records in
  1+0 records out
  512 bytes copied, 0.0185379 s, 27.6 kB/s
  [root at moonstudio 2016-May]# echo $?
  0
  [root at moonstudio 2016-May]# cd 
  [root at moonstudio ~]# umount /dev/sdb14
  [root at moonstudio ~]# rmdir /mnt/data2/ 
  [root at moonstudio ~]# shutdown -r now

but I never get back the setup I used before GRUB was installed by
do-release-upgrade.

Could somebody explain why overwriting the MBRs with data from backups
doesn't remove GRUB from the MBR or what ever else is happening?

Regards,
Ralf





More information about the ubuntu-users mailing list