bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

chainloader with definded sector size


From: User
Subject: chainloader with definded sector size
Date: Wed, 04 Aug 2010 15:13:34 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1

 Hello,

I want to boot ReactOs-LiveCD using an iso with grub2. Knowing that the boot sector is located at the offset 0xA800 (43008. ), and is 2048 bytes length.


I do it this way:
    grub> loopback loop (hd0,1)/ReactOS-LiveCD.iso
    grub> chainloader 84+4            //43008 / 512 = 84
    error : invalid signature

The problem is that my iso has 2048 sector size, whereas grub uses only 512 bytes. Trying to use --force doesn't work, since only 512 bytes are loaded ...

And in fact if I skip the three 512 bytes of my boot sector (so 84+3) :
    grub> chainloader 87+1
grub> //no error, but indeed will crash when using boot
chainloader passes successfully, as grub locates 0x55 and 0xAA at the end.

I searched in the source code and I found:

if (grub_file_read (file, (void *) 0x7C00, GRUB_DISK_SECTOR_SIZE) != GRUB_DISK_SECTOR_SIZE)

Where GRUB_DISK_SECTOR_SIZE is defined as:

#define GRUB_DISK_SECTOR_SIZE 0x200    //512

So it's clear that there is no way to load more than 512 bytes.

Could you please add a way to change the default sector size? Or maybe only add a parameter to chainloader for a custom sector size?

Thank you in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]