Grub2 keeps re-writing (destroying) my partition boot record PBR
I had to move my Ubuntu 10.04 LTS partition (because I had to increase the size of a Windows partition below it). I made a copy of the entire partition, with dd, introduced my new partition layout, where my Ubuntu just sits somewhere else, but it is precisely the same size as before, so I copied the backup back into the partition device.
The partition uses Ext 4, so I use Grub 2. Grub 2 is contained in the partition itself, not in the MBR. I use another boot manager (IBM) to chainload the Ubuntu partition. That worked well so far.
Now after backing up and restoring the partition, I could still boot the partition with no errors, everything was fine. But the next day I could not boot it anymore (could not boot Ubuntu, Windows is fine, so the bootmanager is okay).
Booting from CD and doing a grub-install solved the problem. At least that was I though it did. I could boot Ubuntu just once, after that it failed again. So I reinstalled Grub one more time, and made copies of the partition's boot record with dd if=/dev/sda9 of=backupfile bs=1M count=1
Amazingly, immediately after booting (!) the PBR was modified again. Something writes into the PBR at boot time. I suspect Grub2 to do this.
And even more to my amazement, doing a grub-install, backing up the PBR, and immediately making another grub-install yields a different result in the PBR! Changes start at partition offset 0x50, so this really happens in the PBR and not in the data part of the partition.
A workaround for the problem is to issue a fresh grub-install after each and every bootup, that is hardly a solution.
What rewrites my PBR, why, and how can I stop it? Thanks...
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu grub2 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Oliver
- Solved:
- Last query:
- Last reply: