All of lore.kernel.org
 help / color / mirror / Atom feed
* grub-mkimage
@ 2009-03-21 16:26 Rev. Mr. Gary Meerschaert
  2009-03-23 16:40 ` grub-mkimage Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: Rev. Mr. Gary Meerschaert @ 2009-03-21 16:26 UTC (permalink / raw)
  To: grub-devel

I am getting an error from grub-mkimage. The error is:

grub-mkimage: error: diskboot.img is not one sector size

Does anyone know how I can get this fixed? I am a newbee with grub 
internals, and I don't have a clue as to ho to size the progam.

Thanks,

Gary Meerschaert



^ permalink raw reply	[flat|nested] 4+ messages in thread
* grub-mkimage
@ 2006-11-13 18:51 Andrey Shuvikov
  2006-11-25  3:21 ` grub-mkimage Yoshinori K. Okuji
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Shuvikov @ 2006-11-13 18:51 UTC (permalink / raw)
  To: grub-devel

Hello,

I was looking into how grub2 works and noticed that in
the load list in grub2/boot/i386/pc/diskboot.S sector
number is 8-byte integer, while 
grub2/util/i386/pc/grub-mkimage.c sets the number of
sectors to load at 4-byte offset. Because of this it
actually patches upper part of the sector rather than
number of sectors.

This is the changes I've made:

======================================================
--- grub-mkimage.old  Mon May 08 14:29:10 2006
+++ grub-mkimage.c  Mon Nov 13 13:41:01 2006
@@ -143,7 +143,7 @@ generate_image (const char *dir,
FILE *o
   
   /* i386 is a little endian architecture.  */
   *((grub_uint16_t *) (boot_img +
GRUB_DISK_SECTOR_SIZE
-          - GRUB_BOOT_MACHINE_LIST_SIZE + 4))
+          - GRUB_BOOT_MACHINE_LIST_SIZE + 8))
     = grub_cpu_to_le16 (num);
 
   grub_util_write_image (boot_img, boot_size, out);
======================================================

Sincerely,
Andrey Shuvikov


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-23 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21 16:26 grub-mkimage Rev. Mr. Gary Meerschaert
2009-03-23 16:40 ` grub-mkimage Pavel Roskin
  -- strict thread matches above, loose matches on Subject: below --
2006-11-13 18:51 grub-mkimage Andrey Shuvikov
2006-11-25  3:21 ` grub-mkimage Yoshinori K. Okuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.