Re: initrd loading, max size, addr_min, and page_align

2015-02-09 Thread Michael Zimmermann
yea everyone uses either the master branch or the latest beta - it
should be pretty stable.

I guess there just isn't anyone who has the time to test every single
feature to find bugs so we can say it's 99% stable.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: initrd loading, max size, addr_min, and page_align

2015-02-08 Thread Andrei Borzenkov
В Thu, 5 Feb 2015 21:55:54 +
Eric Ewanco eric.ewa...@genband.com пишет:

 
 Background: I need to use a really large initrd for x86_64 (Linux 3.4.47), 
 and I'm near the limit, so I'm studying grub-core/loader/i386/linux.c to find 
 out the whys and wherefores of the GRUB 2.00 size limit.

GRUB 2.00 is way too old.

 
 In the process of doing this I noticed a strange behavior.  The code has a 
 ceiling (addr_max) and a floor (addr_min) for the initrd.  The initrd is 
 loaded high, so that it ends at the ceiling and grows toward the floor as the 
 size of the initrd increases.  The odd behavior, or at least the one that I 
 don't understand, is that the floor grows upward toward the ceiling at the 
 same time.  The lines in question:
 
   addr_min = (grub_addr_t) prot_mode_target + prot_init_space
  + page_align (size);
 

This code is different in current GIT.

   /* Put the initrd as high as possible, 4KiB aligned.  */
   addr = (addr_max - size)  ~0xFFF;
 
 page_align(size) returns a rounded-up alignment of size; i.e., if size is 
 0x2335b728, it returns 0x2335c000.  Consequently, if the initrd size doubles, 
 the distance between the ceiling and the first byte doubles (expected), AND 
 the distance between the floor and the first byte halves because both are 
 proportional to the size.  I would expect the floor to remain relatively 
 constant based on the memory map.  Maybe be adjusted between 1-4k bytes for 
 alignment, but not by the whole size of the initrd.
 
 I'm wondering if this is a bug, or if my modest and cursory understanding of 
 the code is incorrect.
 
 If I am incorrect, can someone explain the page_align calculus, and also 
 explain how the value of GRUB_LINUX_INITRD_MAX_ADDRESS (0x37FF) was 
 determined, whether it is hard or might be revisable upward on some systems, 
 and what the implications are of changing it (i.e. will it either work or not 
 boot at all, or whether I might silently hose something).
 
 Thanks,
 Eric Ewanco
 
 
 


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: initrd loading, max size, addr_min, and page_align

2015-02-08 Thread Bruce Dubbs

Andrei Borzenkov wrote:

В Thu, 5 Feb 2015 21:55:54 + Eric Ewanco eric.ewa...@genband.com
пишет:



Background: I need to use a really large initrd for x86_64 (Linux 3.4.47),
and I'm near the limit, so I'm studying grub-core/loader/i386/linux.c to
find out the whys and wherefores of the GRUB 2.00 size limit.


GRUB 2.00 is way too old.


But as far as I know grub-2.00 is the last stable release.  There is the more 
current grub-2.02~beta2 that was released over a year ago, but some people 
prefer releases that upstream has designated as stable.


Has grub gone to a policy of git snapshots only and forgone stable releases?

  -- Bruce

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: initrd loading, max size, addr_min, and page_align

2015-02-08 Thread Andrei Borzenkov
В Sun, 08 Feb 2015 11:14:28 -0600
Bruce Dubbs bruce.du...@gmail.com пишет:

 Andrei Borzenkov wrote:
  В Thu, 5 Feb 2015 21:55:54 + Eric Ewanco eric.ewa...@genband.com
  пишет:
 
 
  Background: I need to use a really large initrd for x86_64 (Linux 3.4.47),
  and I'm near the limit, so I'm studying grub-core/loader/i386/linux.c to
  find out the whys and wherefores of the GRUB 2.00 size limit.
 
  GRUB 2.00 is way too old.
 
 But as far as I know grub-2.00 is the last stable release.  There is the 
 more 
 current grub-2.02~beta2 that was released over a year ago, but some people 
 prefer releases that upstream has designated as stable.
 

If you want to discuss a problem on development list, you should at
least verify if this problem exists in current code. 

In practice all ditros I'm aware of are using at least 2.02~beta2 or
what effectively amounts to git snapshot.

 Has grub gone to a policy of git snapshots only and forgone stable releases?
 

I do not think it is intentional.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: initrd loading, max size, addr_min, and page_align

2015-02-08 Thread Bruce Dubbs

Andrei Borzenkov wrote:

В Sun, 08 Feb 2015 11:14:28 -0600
Bruce Dubbs bruce.du...@gmail.com пишет:


Andrei Borzenkov wrote:

В Thu, 5 Feb 2015 21:55:54 + Eric Ewanco eric.ewa...@genband.com
пишет:



Background: I need to use a really large initrd for x86_64 (Linux 3.4.47),
and I'm near the limit, so I'm studying grub-core/loader/i386/linux.c to
find out the whys and wherefores of the GRUB 2.00 size limit.


GRUB 2.00 is way too old.


But as far as I know grub-2.00 is the last stable release.  There is the more
current grub-2.02~beta2 that was released over a year ago, but some people
prefer releases that upstream has designated as stable.



If you want to discuss a problem on development list, you should at
least verify if this problem exists in current code.


I agree.


In practice all ditros I'm aware of are using at least 2.02~beta2 or
what effectively amounts to git snapshot.


Indeed.  We have gone to 2.02~beta2 also, although we prefer it when upstream 
labels a packages as stable.



Has grub gone to a policy of git snapshots only and forgone stable releases?



I do not think it is intentional.


There are several packages that do not release stable releases but only 
snapshots (but it is uncommon), however AFAIK grub is one of the very few active 
packages that does not seem to have a regularly scheduled release process.


It would actually help us if you just said that you are not going to designate 
stable, release candidate, beta, etc tarballs any more and it's up to the distro 
or individual to figure out what version to extract from version control.


  -- Bruce Dubbs
 LFS


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel