* Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ?
@ 2011-02-10 10:15 Baisheng Wang
2011-02-10 12:52 ` Baisheng Wang
0 siblings, 1 reply; 4+ messages in thread
From: Baisheng Wang @ 2011-02-10 10:15 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 147 bytes --]
Dear all:
In the file grub-1.98/loader/i386/linux.c, for the variable prot_size, why
subtract GRUB_DISK_SECTOR_SIZE ?
Thanks & Regards,
Baisheng
[-- Attachment #2: Type: text/html, Size: 174 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ?
2011-02-10 10:15 Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ? Baisheng Wang
@ 2011-02-10 12:52 ` Baisheng Wang
2011-02-10 21:34 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Baisheng Wang @ 2011-02-10 12:52 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
Let me clarify again.
In grub-1.98/loader/i386/linux.c, for the code lines:
"grub_file_seek (file, real_size + GRUB_DISK_SECTOR_SIZE);"
and
"prot_size = grub_file_size (file) - real_size - GRUB_DISK_SECTOR_SIZE;"
I want to know why there is another sector, I mean GRUB_DISK_SECTOR_SIZE ?
Thanks,
Baisheng
2011/2/10 Baisheng Wang <baisheng.wang.cn@gmail.com>
> Dear all:
>
> In the file grub-1.98/loader/i386/linux.c, for the variable prot_size, why
> subtract GRUB_DISK_SECTOR_SIZE ?
>
> Thanks & Regards,
> Baisheng
>
>
[-- Attachment #2: Type: text/html, Size: 929 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ?
2011-02-10 12:52 ` Baisheng Wang
@ 2011-02-10 21:34 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-02-11 0:32 ` Baisheng Wang
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-02-10 21:34 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
On 02/10/2011 03:52 PM, Baisheng Wang wrote:
>
> Let me clarify again.
>
> In grub-1.98/loader/i386/linux.c, for the code lines:
>
> "grub_file_seek (file, real_size + GRUB_DISK_SECTOR_SIZE);"
>
> and
>
> "prot_size = grub_file_size (file) - real_size - GRUB_DISK_SECTOR_SIZE;"
>
> I want to know why there is another sector, I mean GRUB_DISK_SECTOR_SIZE ?
>
Trivial, Watson. first sector contains the part which is launched only
when dd'ing to floppy, not with a propoer bootloader. Actually recent
kernels just contain a stub instruction to use a bootloader
> Thanks,
> Baisheng
>
>
> 2011/2/10 Baisheng Wang <baisheng.wang.cn
> <http://baisheng.wang.cn>@gmail.com <http://gmail.com>>
>
> Dear all:
>
> In the file grub-1.98/loader/i386/linux.c, for the variable
> prot_size, why subtract GRUB_DISK_SECTOR_SIZE ?
>
> Thanks & Regards,
> Baisheng
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ?
2011-02-10 21:34 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-02-11 0:32 ` Baisheng Wang
0 siblings, 0 replies; 4+ messages in thread
From: Baisheng Wang @ 2011-02-11 0:32 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
Ok, It seems that I'v got it.
In file arch/x86/boot/tools/build.c, fill the setup_sects parameters in
header.S with "setup_sectors-1". Why build tool do this, It very strange!
Regards,
Baisheng
"buf[0x1f1] = setup_sectors-1;"
2011/2/11 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
> On 02/10/2011 03:52 PM, Baisheng Wang wrote:
> >
> > Let me clarify again.
> >
> > In grub-1.98/loader/i386/linux.c, for the code lines:
> >
> > "grub_file_seek (file, real_size + GRUB_DISK_SECTOR_SIZE);"
> >
> > and
> >
> > "prot_size = grub_file_size (file) - real_size - GRUB_DISK_SECTOR_SIZE;"
> >
> > I want to know why there is another sector, I mean GRUB_DISK_SECTOR_SIZE
> ?
> >
> Trivial, Watson. first sector contains the part which is launched only
> when dd'ing to floppy, not with a propoer bootloader. Actually recent
> kernels just contain a stub instruction to use a bootloader
> > Thanks,
> > Baisheng
> >
> >
> > 2011/2/10 Baisheng Wang <baisheng.wang.cn
> > <http://baisheng.wang.cn>@gmail.com <http://gmail.com>>
> >
> > Dear all:
> >
> > In the file grub-1.98/loader/i386/linux.c, for the variable
> > prot_size, why subtract GRUB_DISK_SECTOR_SIZE ?
> >
> > Thanks & Regards,
> > Baisheng
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>
> --
> Regards
> Vladimir 'φ-coder/phcoder' Serbinenko
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>
[-- Attachment #2: Type: text/html, Size: 2837 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-11 0:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 10:15 Why prot_size subtract GRUB_DISK_SECTOR_SIZE in the file grub-1.98/loader/i386/linux.c ? Baisheng Wang
2011-02-10 12:52 ` Baisheng Wang
2011-02-10 21:34 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-02-11 0:32 ` Baisheng Wang
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.