All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Pelletier <subdino2004@yahoo.fr>
To: grub-devel@gnu.org
Subject: SPT& &bugreport about ext2
Date: Sun, 12 Dec 2004 20:46:38 +0100	[thread overview]
Message-ID: <41BCA01E.7090305@yahoo.fr> (raw)

-----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-----



             reply	other threads:[~2004-12-12 19:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12 19:46 Vincent Pelletier [this message]
2004-12-12 19:57 ` SPT& &bugreport about ext2 Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41BCA01E.7090305@yahoo.fr \
    --to=subdino2004@yahoo.fr \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.