While updating grub2 recently an error message ran across my terminal saying something about ‘FlexNet’ saving data to ‘Sector 32’, and grub2 taking issue with that. Although my system did boot correctly afterwards (grub2 obviously found a workaround while the legacy grub would simply halt), I do not like software, other than my bootloader, writing stuff to my boot sector. I suspect Adobe was the culprit this time.
At the moment the message did not make much sense to me. After some googling – or rather ‘startpaging’ – FlexNet turned out to be some piece of license managing software which includes DRM routines. And in their utter wisdom the developers decided it was a good idea to store data in a computer’s boot sector. I disagree. So, how to get rid of that?
A long explanation can be found on Ubuntu Forums. Let me summarize in short.
WARNING: this is really serious stuff and any mistake can render your machine unusable! So, please do read the long explanation, including the comments, and BE VERY CAREFUL!
First at least backup your MBR and partition table to your home directory:
sudo dd if=/dev/sda of=~/mbr.img bs=512 count=1
Safer idea: backup all first 63 sectors of your harddisk to your home directory:
sudo dd if=/dev/sda of=~/first_63_sectors bs=512 count=63
Now you have two options: either just erase the contents of sector 32:
sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=32
OR, erase all first sectors (since you do not know if other sectors have been written into as well):
sudo dd if=/dev/zero of=/dev/sda bs=512 count=62 seek=1
‘Erase’ means that you physically overwrite all content with zero data. There is no way to restore anything after that. That is why you made that backup in the first place!
Finally re-install grub:
In case something goes wrong, this is how to restore the original MBR and partition table:
sudo dd if=~/mbr.img of=/dev/sda bs=1 count=64 skip=446
That should do the job.