Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MKd9n-0000Nq-EK for mharc-grub-devel@gnu.org; Sat, 27 Jun 2009 15:01:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKd9l-0000Ne-5B for grub-devel@gnu.org; Sat, 27 Jun 2009 15:01:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKd9g-0000Kk-BC for grub-devel@gnu.org; Sat, 27 Jun 2009 15:01:44 -0400 Received: from [199.232.76.173] (port=44177 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKd9g-0000KU-62 for grub-devel@gnu.org; Sat, 27 Jun 2009 15:01:40 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:34290) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKd9f-00013b-Hd for grub-devel@gnu.org; Sat, 27 Jun 2009 15:01:39 -0400 Received: by ewy4 with SMTP id 4so1868811ewy.42 for ; Sat, 27 Jun 2009 12:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=VTtwryyyh2aB1CKR4xu2wYr0K7mBTLCvdB+xRwG51gE=; b=QGd6U0CzDa8P3rOt1lA1usXcDqMbB7wqxtBdBLKC0bv0KrxHvWDeh3boJODAF9yfO8 ZYlDg+Glte+p9IVgRWGbHzd+5873S1mbaDtvPigZDEJLk3c0ZzQ3401JLxHRtUhYEcVS TaIYEKq7IKv5ZktD1rbbJ2ZK4GeFCIyemMc3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=GwlUOB/W1yURsYMjNNfoDpEEMZ3sP2sEclnHNuRIWHkA2S7zcJSqq5djO9bUe9PpJj 13fIzLeQQwTetjNKclwGKxK43cyh+Aquak4J36WnecRK9mO5ZaSM0+GlphhOKiRvC7xD e4sgCrR8wKxi6UrKefSeUqRzs62hhINJLZFls= MIME-Version: 1.0 Received: by 10.210.40.10 with SMTP id n10mr1025672ebn.51.1246129297771; Sat, 27 Jun 2009 12:01:37 -0700 (PDT) In-Reply-To: <24348-22543@sneakemail.com> References: <24348-22543@sneakemail.com> Date: Sat, 27 Jun 2009 21:01:37 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Problem with gnu-setup 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: Sat, 27 Jun 2009 19:01:45 -0000 On Sat, Jun 27, 2009 at 12:39 PM, Yves BLUSSEAU w= rote: > Hi, > > i'm trying to install grub2 =A0to a partition instead of the MBR (i known= it's > a bad idea, but i need to chainload grub2 from another bootloader). I would rather chainload other bootloader from grub2. If you use another bootloader because of a specific feature speak about it here perhaps someone will be interested to implement it in grub2 > The problem is when i try to install the boot stages with grub-setup i ha= ve > this error: > > /usr/local/sbin/grub2-setup -v --force --directory=3D/tmp/mnt/boot/grub2 > --device-map=3D/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 > =A0core_path_dev =3D grub_util_get_path (dir, core_file); > > core_path_dev need to contain the path AND the device to the core file, b= ut > 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 re= ad > 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 ? use patch by Felix Zielcke > > 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): > =A0fp =3D fopen (core_path, "r+b"); > =A0if (! fp) > =A0 grub_util_error ("Cannot open `%s'", core_path); > > =A0grub_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 > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git