All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: grub-install --root-directory=/mnt /dev/sda1 fails
Date: Wed, 06 May 2009 16:31:57 +0200	[thread overview]
Message-ID: <1241620317.3746.8.camel@fz.local> (raw)

Hello list,

grub-install with some --root-directory option and a partition given as
setup device and not a whole disk doestn't work, i.e. blocklists are
used.
grub-setup fails that it can't find the core.img.

The problem are these 2 lines in setup():
core_path_dev = grub_util_get_path (dir, core_file);
...
file = grub_file_open (core_path_dev);

core_path_dev contains the full path given with the `-d' or
`--directory' option for example /mnt/boot/grub.

This can't work because /mnt is a different filesystem and so GRUB only
sees /boot/grub.
Removing the /mnt part from it works fine:
(gdb) set core_path_dev="/boot/grub/core.img"
(gdb) print *file->device->disk 
$13 = {name = 0x640b90 "hd1,1", dev = 0x62f520, total_sectors = 16777216, has_partitions = 1, id = 1, partition = 0x640c10, read_hook = 0, data = 0x0}

The only solution that comes to my mind for this problem is, to
introduce a `--root-directory' option and making the `--directory'
option relative to it.

Does anyone have a better idea?
-- 
Felix Zielcke




             reply	other threads:[~2009-05-06 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 14:31 Felix Zielcke [this message]
2009-05-06 15:12 ` grub-install --root-directory=/mnt /dev/sda1 fails Vladimir 'phcoder' Serbinenko
2009-06-01 19:39   ` Felix Zielcke
2009-06-08 21:20     ` [PATCH] " Felix Zielcke
2009-06-09 21:51       ` Vladimir 'phcoder' Serbinenko
2009-06-10 23:00         ` Felix Zielcke
2009-06-11 23:21           ` Felix Zielcke
2009-06-11 23:25             ` Felix Zielcke
2009-06-12 10:28               ` Felix Zielcke
2009-06-12 16:21                 ` Pavel Roskin
2009-06-12 16:33                   ` Felix Zielcke
2009-07-01 14:33     ` Felix Zielcke
2009-07-04 20:09       ` Robert Millan
2009-07-08 14:16         ` Felix Zielcke

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=1241620317.3746.8.camel@fz.local \
    --to=fzielcke@z-51.de \
    --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.