Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: duplicate gentoo system - errors
Date: Thu, 26 Nov 2020 03:42:09
Message-Id: rpn865$g8j$1@ciao.gmane.io
In Reply to: Re: [gentoo-user] Re: duplicate gentoo system - errors by Neil Bothwick
1 On 2020-11-25, Neil Bothwick <neil@××××××××××.uk> wrote:
2 > On Wed, 25 Nov 2020 19:43:04 -0000 (UTC), Grant Edwards wrote:
3 >
4 >> > Rename one of the directories and see if you can still boot :)
5 >>
6 >> That may not be a valid test. If grub is using a blocklist to locate
7 >> secondary files, renaming the directory that contains those files
8 >> won't bother grub at all. Even rm'ing the files and directory might
9 >> not cause problems until the disk blocks of interest get reused by new
10 >> files.
11 >
12 > Good point. I'm so glad I rarely have to use GRUB these days.
13
14 What I don't know anymore is in which situations grub2 uses a
15 blocklist and for what files. If you install grub2 in a partition
16 (instead of MBR), I'm pretty sure it does. There are file locking
17 mechanisms in some filesystems that you can use to make sure the
18 blocks for the critical file(s) don't change. I've got some notes
19 somewhere on that...
20
21 IIRC, legacy grub used blocklists in most installation cases.
22
23 There might be situations with grub2 where it doesn't have to use a
24 blocklist to find files within the linux /boot/grub directory.
25 Perhaps an MBR installation with plenty of empty space between the MBR
26 and first partition? Or when /boot is a FAT partition?
27
28 --
29 Grant