From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NHb0B-0007uT-VV for mharc-grub-devel@gnu.org; Mon, 07 Dec 2009 05:39:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHb09-0007s9-8x for grub-devel@gnu.org; Mon, 07 Dec 2009 05:39:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHb03-0007mY-Da for grub-devel@gnu.org; Mon, 07 Dec 2009 05:39:31 -0500 Received: from [199.232.76.173] (port=48525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHb02-0007mG-Sx for grub-devel@gnu.org; Mon, 07 Dec 2009 05:39:26 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:59760) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHb02-0006OS-7h for grub-devel@gnu.org; Mon, 07 Dec 2009 05:39:26 -0500 Received: from [85.180.10.102] (e180010102.adsl.alicedsl.de [85.180.10.102]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0McPxo-1NZ7ql0p60-00Hktl; Mon, 07 Dec 2009 11:39:23 +0100 From: Felix Zielcke To: The development of GNU GRUB In-Reply-To: <20091206.233053.45905914.davem@davemloft.net> References: <20091206.233053.45905914.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 07 Dec 2009 11:39:22 +0100 Message-ID: <1260182362.2908.5.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.29.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+j7m5yCJaVCPrJVoLZct1pxWSRWU+j4tptltw QJnyTQabwe7gkemB/Fnco7KQhRWq36CdCoOcF+hp4SkXowbeUX h6M/n0WT8qubUxNkabTriGyswNR5Vpp X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: mkrelpath doesn't do what it should... X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 10:39:33 -0000 Am Sonntag, den 06.12.2009, 23:30 -0800 schrieb David Miller: > I was trying to figure out why the kernel image paths generated > automatically for me by grub-mkconfig were not correct. > > I have /boot on a seperate partition, but in the generated config > files it uses paths like /boot/vmlinux-2632 etc. > > The problem is grub-mkrelpath and it's usage in the scrips such as > "10_linux". > > "/boot" is given to "grub-mkrelpath", and this results in > the identical "/boot" in rel_dirname. > > So all the paths emitted by 10_linux end up being "/boot" based > instead of "/" based. > > grub-mkrelpath seems to do the right thing if I pass it a full path, > f.e. giving it "/boot/vmlinux" emits the correct "/vmlinux" The one mount point case is now fixed in r1917 See Subject: `handling mount points in grub-mkrelpath' from me for the patch. > Casually inspecting make_system_path_relative_to_its_root() shows what > appears to be another bug. It seems to immediately break from the > loop when a different device number than "/"'s is seen, but what if I > have: > > /one/two/three > > Where / is /dev/hda1, /one/two is /dev/hda2 and /one/two/three is yet > another mount from /dev/hda3. It seems like the premature loop exit > in this function will give us the wrong result here. > > The loop needs to remember the string prefix point at which every > device number change occurs, and once the whole path has been > traversed it should unwind back to that point in order to emit > the result. Multiple mount points are an interesting case. Haven't thought about them. But they should be now handled correctly too. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer