help-grub
[Top][All Lists]
Advanced

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

Re: mysterious changes in post-MBR gap


From: webslim
Subject: Re: mysterious changes in post-MBR gap
Date: Mon, 17 Aug 2015 06:37:37 -0500
User-agent: Internet Messaging Program (IMP) H5 (6.2.2)

Andrei Borzenkov <address@hidden> wrote [on Mon, Aug 17, 2015 at 06:48:51AM +0300]:
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?

Yes.


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.

And according to the documentation this is stored at /boot/grub/, not
outside the file system.


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)?


You were right.
This is not a grub issue. I checked from the initramfs: no changes there.
And this happens also only on this particular machine.
Time for a fresh install... Thanks for the advice!
<p>Quoting Andrei Borzenkov &lt;<a href="mailto:address@hidden";>address@hidden</a>&gt;:</p><blockquote type="cite" style="border-left:2px solid blue;margin-left:2px;padding-left:12px;">16.08.2015 15:53, <a href="mailto:address@hidden";>address@hidden</a> пишет:<blockquote type="cite" style="border-left:2px solid blue;margin-left:2px;padding-left:12px;">Hi folks,<br />
<br />
Once upon a time I wrote a small init script that computes a checksum<br />
of the MBR and the gap behind it where GRUB2 lives, and also of the<br />
boot partition, and compares them to already saved values.<br />
Everytime I do a Kernel or GRUB update, I also make an image and save<br />
the checksum. Up until grub-2.02 these values did not change if I would<br />
not touch anything and always boot the default entry.<br />
But recently, the post-MBR gap check started to fail every time.<br />
A diff of the hexdump of the first 2MB of the disk showed some small<br />
discrepancies (at around 0x00100420 and 0x00100570). Before rebooting,<br />
they did not exist. After each boot, there are some small changes.<br />
So my question is:<br />
- Does grub keep some kind of counter or status information when<br />
&nbsp; booting? This would calm me somehow.<br />
- Or does this mean there is something strange going on on my machine?<br />
</blockquote>Do you mean that you do grub-install, compute checksum, reboot, compute checksume and both checksums are different?<br />
<br />
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.<br /> 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)?</blockquote><br /><br />



-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!


reply via email to

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