From: "Yves BLUSSEAU" <cl7m42e02@sneakemail.com>
To: grub-devel@gnu.org
Subject: Problem with gnu-setup
Date: Sat, 27 Jun 2009 12:39:45 +0200 [thread overview]
Message-ID: <24348-22543@sneakemail.com> (raw)
Hi,
i'm trying to install grub2 to a partition instead of the MBR (i
known it's a bad idea, but i need to chainload grub2 from another
bootloader).
The problem is when i try to install the boot stages with grub-setup i
have this error:
/usr/local/sbin/grub2-setup -v --force --directory=/tmp/mnt/boot/grub2
--device-map=/tmp/mnt/boot/grub2/device.map '(hd2,2)'
grub-setup: error: Cannot read `/tmp/mnt/boot/grub2/core.img' correctly
The problem came from line 405 of grub-setup.c
core_path_dev = grub_util_get_path (dir, core_file);
core_path_dev need to contain the path AND the device to the core
file, but it's only a "concatenation" of dir and core_file.
In my case it contain /tmp/mnt/boot/grub2/core.img so when grub try to
read the core image FROM grub it can't: grub_file_open return with an
error because it don't know the device.
core_path_dev need to be (hd2,2)//tmp/mnt/boot/grub2/core.img in my
case to work.
Can someone fix this bug ?
Another think i don't understand is that i don't see where the
blocklists are saved because at this end of grub-setup.c (line 520):
fp = fopen (core_path, "r+b");
if (! fp)
grub_util_error ("Cannot open `%s'", core_path);
grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE * 2, fp);
the core file is open in read mode so no datas can be written.
I hope that this can help you.
Yves Blusseau
next reply other threads:[~2009-06-27 10:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 10:39 Yves BLUSSEAU [this message]
2009-06-27 19:01 ` Problem with gnu-setup Vladimir 'phcoder' Serbinenko
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=24348-22543@sneakemail.com \
--to=cl7m42e02@sneakemail.com \
--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.