On 06/12/2010 07:26 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
Any "hybrid" cofiguration fails the criteria of non confusability.
I was assuming the new partition notation. The old notation is clearly ambiguous when there are multiple partmaps, and AFAIR the new notation was introduced precisely to solve that problem: http://lists.gnu.org/archive/html/grub-devel/2010-01/msg00320.html By the way, the old notation is worse than ambiguous when there are multiple partmaps: the meaning of partition identifiers depends on the partmap modules that are loaded, and on the order in which they are loaded.
Let's consider a following situation: - I format disk with scheme A and partitions A1, A2, A3 - I get bored and reformat with scheme B and partitios B1, B2, B3, B4. When I did this filesystem on A2 may stay intact - I use grub which supposes that it'shybrid system A+B and save_env's to A2 since it's a valid partition on valid filesystem. But by a bad luck save_env overlaps with superblock of B3 which becomes corrupted.
If you save_env with -f then, with new notation, you know that you are using the old scheme A. If you didn't use -f, then it means that grub modules were installed into A2 and survived the reformat, but then, how could GRUB know that A is obsolete? IMHO corrupting the superblock of B3 is acceptable in that case. An alternative would be to check that partitions do not overlap (with the exception of identical partitions). But even this would work only if the partmap module for B was loaded, which is likely not the case (as grub was installed at the time A was used).
And currently grub isn't changed to new partition notation completely. E.g. during startup prefix is calculated with old syntax and confusing A+B with either A or B is likely to make user drop into rescue shell
Is someone working on making the startup prefix use the new notation? Grégoire _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel