bug-grub
[Top][All Lists]
Advanced

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

Re: chainloader with definded sector size


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: chainloader with definded sector size
Date: Wed, 04 Aug 2010 17:47:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5

On 08/04/2010 04:13 PM, User wrote:
>  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 see no reason to support such obscure interface considering that
freeldr.sys can be loaded with multiboot command.
>
> 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.
>
> _______________________________________________
> Bug-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-grub
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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