From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NEqlC-00033k-DM for mharc-grub-devel@gnu.org; Sun, 29 Nov 2009 15:52:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEqlA-000322-Lv for grub-devel@gnu.org; Sun, 29 Nov 2009 15:52:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEql5-0002xu-Vp for grub-devel@gnu.org; Sun, 29 Nov 2009 15:52:44 -0500 Received: from [199.232.76.173] (port=55269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEql5-0002xm-PX for grub-devel@gnu.org; Sun, 29 Nov 2009 15:52:39 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:54794) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NEql5-0004Bn-65 for grub-devel@gnu.org; Sun, 29 Nov 2009 15:52:39 -0500 Received: from [85.180.15.106] (e180015106.adsl.alicedsl.de [85.180.15.106]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Lpzv9-1NkJM627R1-00fL9F; Sun, 29 Nov 2009 21:52:33 +0100 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-zv/BETO5A5P1S4r48GmL" Date: Sun, 29 Nov 2009 21:52:32 +0100 Message-ID: <1259527952.3150.31.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.29.2 X-Provags-ID: V01U2FsdGVkX19+e8V7sFO4mBvu0R56+/MrGJA6u3UnYM5oqEc mDbO6Ny2gpZ9f1jo83BkvXEBjjSTuPcxiHDrdcY2EgdLPSLOrE OMgC7Uc8nMdUi9PjEhKDg== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: handling mount points in grub-mkrelpath 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: Sun, 29 Nov 2009 20:52:44 -0000 --=-zv/BETO5A5P1S4r48GmL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Vladimir wanted to have this discussed on ML The old shell function make_system_path_relative_to_its_root outputed / if you gave it /boot and it was on a seperate partition. grub-mkrelpath currently outputs /boot This breaks booting at least with the 10_linux generated entries. Attached is my fix for that, which I'll update today to Debian. We already broke backward compatibility with the commandline for Xen. IMO in this grub-mkrelpath case there's no need to break compatibility. But maybe I can find a good way to handle this inside util/grub-mkconfig_lib.in just for compatibility. -- Felix Zielcke Proud Debian Maintainer and GNU GRUB developer --=-zv/BETO5A5P1S4r48GmL Content-Disposition: attachment; filename="02_fix_mountpoints_in_mkrelpath.diff" Content-Type: text/x-patch; name="02_fix_mountpoints_in_mkrelpath.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit 2009-11-29 Felix Zielcke * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with mount points. === modified file 'util/misc.c' --- util/misc.c 2009-11-25 23:10:02 +0000 +++ util/misc.c 2009-11-29 19:19:28 +0000 @@ -500,7 +500,17 @@ make_system_path_relative_to_its_root (c /* buf is another filesystem; we found it. */ if (st.st_dev != num) - break; + { + /* offset == 0 means path given is the mount point. */ + if (offset == 0) + { + free (buf); + free (buf2); + return strdup ("/"); + } + else + break; + } offset = p - buf; /* offset == 1 means root directory. */ --=-zv/BETO5A5P1S4r48GmL--