On 2020-11-25, Neil Bothwick <n...@digimed.co.uk> wrote:
> On Wed, 25 Nov 2020 19:43:04 -0000 (UTC), Grant Edwards wrote:
>
>> > Rename one of the directories and see if you can still boot :)  
>> 
>> That may not be a valid test. If grub is using a blocklist to locate
>> secondary files, renaming the directory that contains those files
>> won't bother grub at all. Even rm'ing the files and directory might
>> not cause problems until the disk blocks of interest get reused by new
>> files.
>
> Good point. I'm so glad I rarely have to use GRUB these days.

What I don't know anymore is in which situations grub2 uses a
blocklist and for what files. If you install grub2 in a partition
(instead of MBR), I'm pretty sure it does. There are file locking
mechanisms in some filesystems that you can use to make sure the
blocks for the critical file(s) don't change. I've got some notes
somewhere on that...

IIRC, legacy grub used blocklists in most installation cases.

There might be situations with grub2 where it doesn't have to use a
blocklist to find files within the linux /boot/grub directory.
Perhaps an MBR installation with plenty of empty space between the MBR
and first partition? Or when /boot is a FAT partition?

--
Grant


Reply via email to