* SPT& &bugreport about ext2
@ 2004-12-12 19:46 Vincent Pelletier
2004-12-12 19:57 ` Marco Gerards
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Pelletier @ 2004-12-12 19:46 UTC (permalink / raw)
To: grub-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I'm the main developer of the SPT project, aimed at replacing the
current DOS partition system, and maybe to offer a unified and
open-sourced partitioning system. (more details on http://spt.sysif.net/ )
I've integrated my system to the grub 2 current cvs version (see CVSweb
at cvs.sysif.net, "spt_base" module, "grub2" folder), and I have met
some problems in its integration that I would like to mention here.
1) My test computer wasn't able to boot grub 2 when booting from disk,
but it was ok when booting from a floppy. It was because that piece of
code was removed in boot/i386/pc/boot.S compared to legacy's stage 1 :
(line 111)
/*
* This is a workaround for buggy BIOSes which don't pass boot
* drive correctly. If GRUB is installed into a HDD, do
* "orb $0x80, %dl", otherwise "orb $0x00, %dl" (i.e. nop).
*/
.byte 0x80, 0xca
boot_drive_mask:
.byte 0x00
(the last byte has to be set to 0x80 to make it work)
Why was it removed ?
2) I am now stuck at a memory allocation problem. When I set the dos
partition number to make grub2 read the grub.cfg file, it results in
"alloc magic is broken at 0x1f640".
More details:
- -disk partitioned in SPT format
- -4 partitions (1 swap, 3 ext2 all fsck'ed)
- -/boot/grub exists in 2nd partition (1st ext2), but not the config file
(when the config file is present, the menu is partialy drawn and the
computer freezes)
- -dos partition number : 01 00 00 00 (big endian)
- -bsd partition number : FF FF FF FF (big endian)
- -makes qemu segfaults, bochs works fine
- -works fine with partitions 2 & 3 (prefix variable is correctly set and
I get the prompt)
I found that it cames from a grub_free call in the last lines of
grub_ext2_dir function, and caused by "grub_ext2_iterate_dir (fdiro,
iterate);".
By the way, I noticed that a freed memory area is accessed :
fail:
~ grub_free (data);
~ if (fdiro != &(data->diropen))
~ grub_free (fdiro);
Moreover, the "fail" label is reached when data malloc fails, so it
tries to free an unallocated area in case of problem.
Vincent Pelletier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBvKAeFEQoKRQyjtURAlSTAJ9zGiVR/K5LCP1dy1pCqAVD5pMrewCcDFBc
U+TcX3cxQLyvJmlZzqN6yNQ=
=wlrY
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SPT& &bugreport about ext2
2004-12-12 19:46 SPT& &bugreport about ext2 Vincent Pelletier
@ 2004-12-12 19:57 ` Marco Gerards
0 siblings, 0 replies; 2+ messages in thread
From: Marco Gerards @ 2004-12-12 19:57 UTC (permalink / raw)
To: The development of GRUB 2
Vincent Pelletier <subdino2004@yahoo.fr> writes:
Hi Vincent,
Thanks a lot for your bug report.
> I found that it cames from a grub_free call in the last lines of
> grub_ext2_dir function, and caused by "grub_ext2_iterate_dir (fdiro,
> iterate);".
Ok, I will have a look at this and fix this ASAP.
> Moreover, the "fail" label is reached when data malloc fails, so it
> tries to free an unallocated area in case of problem.
It is no problem to call grub_free when the pointer is a null pointer.
Thanks,
Marco
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-12 20:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-12 19:46 SPT& &bugreport about ext2 Vincent Pelletier
2004-12-12 19:57 ` Marco Gerards
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.