Re: Failure to embed core.img is fatal now

2008-06-29 Thread Pavel Roskin
Quoting Robert Millan <[EMAIL PROTECTED]>: On Thu, Jun 26, 2008 at 12:54:54PM -0400, Pavel Roskin wrote: + dos_part = grub_cpu_to_le32 (root_dev->disk->partition->index); + bsd_part = grub_cpu_to_le32 (-1); [...] grub_util_info ("dos partition is %d, bsd partition is

Re: Failure to embed core.img is fatal now

2008-06-29 Thread Robert Millan
On Thu, Jun 26, 2008 at 12:54:54PM -0400, Pavel Roskin wrote: > + dos_part = grub_cpu_to_le32 (root_dev->disk->partition->index); > + bsd_part = grub_cpu_to_le32 (-1); > [...] >grub_util_info ("dos partition is %d, bsd partition is %d", > - grub_le_to_cpu32 (*i

Re: Failure to embed core.img is fatal now

2008-06-26 Thread Pavel Roskin
On Thu, 2008-06-26 at 10:48 -0400, Pavel Roskin wrote: > Anyway, I think there is a much simpler approach. Changes to the memory > image of core.img should be applied after the image is tested for > readability. Until then, they should be in temporary variables. Here's the patch. It's an alter

Re: Failure to embed core.img is fatal now

2008-06-26 Thread Pavel Roskin
On Thu, 2008-06-26 at 16:20 +0200, Robert Millan wrote: > On Wed, Jun 25, 2008 at 05:48:34PM -0400, Pavel Roskin wrote: > > > > I'm also surprised that the code alternately uses dir and > > DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 > > times in one function! If dir and

Re: Failure to embed core.img is fatal now

2008-06-26 Thread Robert Millan
On Wed, Jun 25, 2008 at 05:48:34PM -0400, Pavel Roskin wrote: > > I'm also surprised that the code alternately uses dir and > DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 > times in one function! If dir and DEFAULT_DIRECTORY are used correctly, > I suggest that two differe

Re: Failure to embed core.img is fatal now

2008-06-25 Thread Pavel Roskin
On Wed, 2008-06-25 at 17:48 -0400, Pavel Roskin wrote: > It turns out following happens in grub-setup: > > - core.img is read by the OS facilities > - the memory image is modified > - the memory image is compared to core.img read by GRUB FS code and fails > - the memory image is modified again >

Re: Failure to embed core.img is fatal now

2008-06-25 Thread Pavel Roskin
On Thu, 2008-06-26 at 03:02 +0200, Javier Martín wrote: > El mié, 25-06-2008 a las 17:48 -0400, Pavel Roskin escribió: > > I'm also surprised that the code alternately uses dir and > > DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 > > times in one function! If dir and DEFAUL

Re: Failure to embed core.img is fatal now

2008-06-25 Thread Javier Martín
El mié, 25-06-2008 a las 17:48 -0400, Pavel Roskin escribió: > I'm also surprised that the code alternately uses dir and > DEFAULT_DIRECTORY to calculate core_path. core_path is calculated 3 > times in one function! If dir and DEFAULT_DIRECTORY are used correctly, > I suggest that two different v

Failure to embed core.img is fatal now

2008-06-25 Thread Pavel Roskin
Hello! I have a system with a hard drive with a geometry that doesn't leave space for GRUB to be embedded: Disk /dev/sda: 30.0 GB, 30020272128 bytes 64 heads, 32 sectors/track, 28629 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk identifier: 0xfafa98d2 Device Boot Start