From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SGdb6-00078F-Vt for mharc-grub-devel@gnu.org; Sat, 07 Apr 2012 17:55:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGdb4-00075y-67 for grub-devel@gnu.org; Sat, 07 Apr 2012 17:55:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGdb2-00086w-96 for grub-devel@gnu.org; Sat, 07 Apr 2012 17:55:01 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:39497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGdb2-00086m-06 for grub-devel@gnu.org; Sat, 07 Apr 2012 17:55:00 -0400 Received: from [192.168.0.4] (d14-69-47-19.try.wideopenwest.com [69.14.19.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 44EE11B408F for ; Sat, 7 Apr 2012 21:54:57 +0000 (UTC) Message-ID: <4F80B7AE.9000607@gentoo.org> Date: Sat, 07 Apr 2012 17:54:54 -0400 From: Mike Gilbert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Improve support for genkernel in 10_linux X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDFE7C7D62FD8A0F3B511C4EA" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 140.211.166.183 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 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: Sat, 07 Apr 2012 21:55:03 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDFE7C7D62FD8A0F3B511C4EA Content-Type: multipart/mixed; boundary="------------000205070808000908040103" This is a multi-part message in MIME format. --------------000205070808000908040103 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gentoo Linux maintains its own kernel builder and initramfs generation utility called "genkernel". It looks like some attempt was made to make 10_linux compatible with initiramfs images created by genkernel. However, this support is currently broken. There are two problems. Firstly, genkernel initramfs images are named like so: initramfs-genkernel-$ARCH-$version 10_linux currently looks for this: initramfs-genkernel-$version The simplest solution here would be to use a wildcard beteen genkernel and $version. Secondly, genkernel looks for the "real_root" kernel command line option to determine the root filesystem. This is a holdover from the days when we used true initrd images and we needed to use root=3D/dev/ram0. I have attached a rough patch that resolves these issues. I would appreciate any feedback you can give me. My goal is to move this upstream so that I will not have to rebase it in the future. --------------000205070808000908040103 Content-Type: text/x-patch; name="grub-2.00-10_linux-genkernel.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="grub-2.00-10_linux-genkernel.patch" =3D=3D=3D modified file 'util/grub.d/10_linux.in' --- util/grub.d/10_linux.in 2012-03-10 14:21:25 +0000 +++ util/grub.d/10_linux.in 2012-04-07 21:24:06 +0000 @@ -135,7 +135,7 @@ message=3D"$(gettext_printf "Loading Linux %s ..." ${version})" sed "s/^/$submenu_indentation/" << EOF echo '$message' - linux ${rel_dirname}/${basename} root=3D${linux_root_device_thisversion= } ro ${args} + linux ${rel_dirname}/${basename} ${rootcmd}=3D${linux_root_device_thisv= ersion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. @@ -181,19 +181,31 @@ alt_version=3D`echo $version | sed -e "s,\.old$,,g"` linux_root_device_thisversion=3D"${LINUX_ROOT_DEVICE}" =20 + rootcmd=3Droot initrd=3D + pushd "${dirname}" > /dev/null for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${ver= sion}.gz" \ "initrd-${version}" "initramfs-${version}.img" \ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ - "initrd-${alt_version}" "initramfs-${alt_version}.img" \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}"; do - if test -e "${dirname}/${i}" ; then + "initrd-${alt_version}" "initramfs-${alt_version}.img"; do + if test -e "${i}" ; then initrd=3D"$i" break fi done =20 + if [ "x$initrd" =3D x ]; then + for i in "initramfs-genkernel"*"-${version}" \ + "initramfs-genkernel"*"-${alt_version}"; do + if test -e "${i}"; then + initrd=3D"$i" + rootcmd=3Dreal_root + break + fi + done + fi + popd > /dev/null + config=3D for i in "${dirname}/config-${version}" "${dirname}/config-${alt_versi= on}" "/etc/kernels/kernel-config-${version}" ; do if test -e "${i}" ; then --------------000205070808000908040103-- --------------enigDFE7C7D62FD8A0F3B511C4EA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iF4EAREIAAYFAk+At64ACgkQC77qH+pIQ6SI9wD+N/cO+x68pXT3ZwSVPb8iqM1E 0zK7b0Em29iHG6Q6coAA/jsU6VYLomUNvswU6A1n4Z7JKPg5jjwGfkvW60GQoSes =PkYU -----END PGP SIGNATURE----- --------------enigDFE7C7D62FD8A0F3B511C4EA--