From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1M1iAK-00085w-AR for mharc-grub-devel@gnu.org; Wed, 06 May 2009 10:32:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1iAH-00084I-Sq for grub-devel@gnu.org; Wed, 06 May 2009 10:32:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1iAD-00081V-DC for grub-devel@gnu.org; Wed, 06 May 2009 10:32:05 -0400 Received: from [199.232.76.173] (port=41007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1iAD-00081J-59 for grub-devel@gnu.org; Wed, 06 May 2009 10:32:01 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:60563) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1iAC-0003xZ-IO for grub-devel@gnu.org; Wed, 06 May 2009 10:32:00 -0400 Received: from [85.180.42.240] (e180042240.adsl.alicedsl.de [85.180.42.240]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1M1iAA2hg1-0001pK; Wed, 06 May 2009 16:31:58 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: text/plain Date: Wed, 06 May 2009 16:31:57 +0200 Message-Id: <1241620317.3746.8.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+WBoBJkOYjTq1OjSIltZbN+UjdC1AX+NLxSXw dJZZs/8UfhkR/7Xqv1BUVttQhvRX4koLDcV2FvLNN/V+UVFAx2 OauJLrGc4i9PbjGE8Y2vs43o3yXh2xy X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: grub-install --root-directory=/mnt /dev/sda1 fails X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 14:32:06 -0000 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