[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-install --root-directory=/mnt /dev/sda1 fails

From: Vladimir 'phcoder' Serbinenko
Subject: Re: grub-install --root-directory=/mnt /dev/sda1 fails
Date: Wed, 6 May 2009 17:12:14 +0200

On Wed, May 6, 2009 at 4:31 PM, Felix Zielcke <address@hidden> wrote:
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
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 = "">
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?
Don't we already have a function which transforms host directory into grub directory? AFAIR we have. 

Felix Zielcke

Grub-devel mailing list

Vladimir 'phcoder' Serbinenko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]