[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mysterious changes in post-MBR gap

From: Andrei Borzenkov
Subject: Re: mysterious changes in post-MBR gap
Date: Mon, 17 Aug 2015 06:48:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

16.08.2015 15:53, address@hidden пишет:
Hi folks,

Once upon a time I wrote a small init script that computes a checksum
of the MBR and the gap behind it where GRUB2 lives, and also of the
boot partition, and compares them to already saved values.
Everytime I do a Kernel or GRUB update, I also make an image and save
the checksum. Up until grub-2.02 these values did not change if I would
not touch anything and always boot the default entry.
But recently, the post-MBR gap check started to fail every time.
A diff of the hexdump of the first 2MB of the disk showed some small
discrepancies (at around 0x00100420 and 0x00100570). Before rebooting,
they did not exist. After each boot, there are some small changes.
So my question is:
- Does grub keep some kind of counter or status information when
   booting? This would calm me somehow.
- Or does this mean there is something strange going on on my machine?

Do you mean that you do grub-install, compute checksum, reboot, compute checksume and both checksums are different?

Bugs withstanding, the only time when grub writes anything to disk is when saving environment variables. So checking grub.cfg for save_env commands makes sens.

Also if you compute checksum after reboot it could be operating system (anything is startup sequence) that does it. Did you try booting in single user (or even with init=/bin/sh to rule out everything)?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]