From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Sbov8-0003pI-5Q for garchives@archives.gentoo.org; Tue, 05 Jun 2012 08:15:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59CDDE09EA; Tue, 5 Jun 2012 08:14:58 +0000 (UTC) Received: from echo517.server4you.de (echo517.server4you.de [85.25.138.180]) by pigeon.gentoo.org (Postfix) with ESMTP id 66FCCE0653 for ; Tue, 5 Jun 2012 08:13:32 +0000 (UTC) Received: from port-92-198-2-52.static.qsc.de ([92.198.2.52]) by echo517.server4you.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1SbotO-0003zG-9g for gentoo-user@lists.gentoo.org; Tue, 05 Jun 2012 10:13:31 +0200 Message-ID: <4FCDBF97.4020902@morlix.de> Date: Tue, 05 Jun 2012 10:13:11 +0200 From: morlix User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] genkernel initramfs and grub2-mkconfig References: <4FCD0105.4000906@morlix.de> <4FCD1175.20309@hadt.biz> In-Reply-To: <4FCD1175.20309@hadt.biz> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig71B43A6879687BE1681E56BA" X-Spam-score: -2.9 X-Spam-bar: -- X-Spam-report: Software zur Erkennung von "Spam" auf dem Rechner echo517.server4you.de hat die eingegangene E-mail als mögliche "Spam"-Nachricht identifiziert. Die ursprüngliche Nachricht wurde an diesen Bericht angehängt, so dass Sie sie anschauen können (falls es doch eine legitime E-Mail ist) oder ähnliche unerwünschte Nachrichten in Zukunft markieren können. Bei Fragen zu diesem Vorgang wenden Sie sich bitte an the administrator of that system Vorschau: I thought if root= is not set to /dev/ram0 the kernel doesn't use the initramfs as "first" root. The server is on a remote location so i can't see if it correctly starts the /linuxrc in the initramfs. [...] Inhaltsanalyse im Detail: (-2.9 Punkte, 5.0 benötigt) Pkte Regelname Beschreibung ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Nachricht wurde nur über vertrauenswürdige Rechner weitergeleitet -1.9 BAYES_00 BODY: Spamwahrscheinlichkeit nach Bayes-Test: 0-1% [score: 0.0000] X-Archives-Salt: 70dc907f-570f-4cd4-a568-d4d1254edd70 X-Archives-Hash: fbb99e6155f730460a30f69c71455449 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig71B43A6879687BE1681E56BA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I thought if root=3D is not set to /dev/ram0 the kernel doesn't use the initramfs as "first" root. The server is on a remote location so i can't see if it correctly starts the /linuxrc in the initramfs. The server boots without problems, i just wanted to check if root=3D shouldn't be set to root=3D/dev/ram0, so that my initramfs will be used. Here is the interesting part on my machine: menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f14c5701-d 305-4bd7-9655-f20f5877a5aa' { load_video insmod gzio insmod part_gpt insmod part_gpt insmod diskfilter insmod mdraid1x insmod ext2 set root=3D'mduuid/4aff33622e32377381237e3004a4b8bc' if [ x$feature_platform_search_hint =3D xy ]; then search --no-floppy --fs-uuid --set=3Droot --hint=3D'mduuid/4aff33622e32377381237e3004a4b8bc' 71d9e42f-84b7-4e16-bd07-b88d09c4f 513 else search --no-floppy --fs-uuid --set=3Droot 71d9e42f-84b7-4e16-bd07-b88d09c4f513 fi echo 'Loading Linux x86_64-3.2.11-hardened_20120601-1 ...' linux /kernel-genkernel-x86_64-3.2.11-hardened_20120601-1 root=3DUUID=3Df14c5701-d305-4bd7-9655-f20f5877a5aa ro dolvm domdadm r eal_root=3DUUID=3Df14c5701-d305-4bd7-9655-f20f5877a5aa echo 'Loading initial ramdisk ...' initrd /initramfs-genkernel-x86_64-3.2.11-hardened_20120601-1 } Thanks for your answers! Am 04.06.2012 21:50, schrieb Michael Hampicke: >=20 >=20 > Am 04.06.2012 21:10, schrieb Paul Hartman: >> On Mon, Jun 4, 2012 at 1:40 PM, morlix wrote: >>> Hello, >>> >>> does anybody of you know how to get the grub2-mkconfig script to >>> correctly detect initramfs and set the kernel parameter "root=3D" to >>> /dev/ram0 or just don't set the parameter at all. >>> >>> I'm using genkernel and want to use my generated initramfs, but >>> everytime grub2-mkconfig gets called it sets the kernel parameter roo= t=3D >>> to my root partition and then the initramfs won't get used. >>> >>> I think manually editing /boot/grub2/grub.cfg and deleting the root=3D= >>> parameter and setting real_root isn't a good choice for long term. >> >> The default scripts for grub2-mkconfig looks for a specific filename >> for the initramfs, related to the kernel filename. If you look in >> those scripts, you may be able to modify it to look at your filenames >> instead. >=20 > Paul is right, but you shouldn't need to modify anything. Here's what > grub2-mkconfig generates on my machine (first entry only): >=20 >=20 > menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class > gnu --class os $menuentry_id_option > 'gnulinux-simple-713f1c17-1b9a-4967-ac05-d6a6a9ff60a5' { > load_video > set gfxpayload=3Dkeep > insmod gzio > insmod part_gpt > insmod ext2 > set root=3D'hd0,gpt2' > if [ x$feature_platform_search_hint =3D xy ]; then > search --no-floppy --fs-uuid --set=3Droot --hint-bios=3Dhd0,g= pt2 > --hint-efi=3Dhd0,gpt2 --hint-baremetal=3Dahci0,gpt2 > e39917c2-b59e-4447-bcae-39a41c3816a7 > else > search --no-floppy --fs-uuid --set=3Droot > e39917c2-b59e-4447-bcae-39a41c3816a7 > fi > echo 'Loading Linux x86_64-3.3.5-gentoo ...' > linux /kernel-genkernel-x86_64-3.3.5-gentoo > root=3DUUID=3D713f1c17-1b9a-4967-ac05-d6a6a9ff60a5 ro > echo 'Loading initial ramdisk ...' > initrd /initramfs-genkernel-x86_64-3.3.5-gentoo > } >=20 >=20 > And here are the file in /boot > # find /boot/ -name "*genkernel*" > /boot/kernel-genkernel-x86_64-3.3.5-gentoo > /boot/System.map-genkernel-x86_64-3.3.5-gentoo > /boot/initramfs-genkernel-x86_64-3.3.5-gentoo > /boot/kernel-genkernel-x86_64-3.3.5-gentoo.old > /boot/System.map-genkernel-x86_64-3.3.5-gentoo.old > /boot/initramfs-genkernel-x86_64-3.3.5-gentoo.old >=20 > It boots perfectly fine using my initramfs --------------enig71B43A6879687BE1681E56BA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/Nv5cACgkQVvh+B8/faonoYgCbBwPQnkW9pOEKyn3zplxTzvbD hU4AnAoxXatgLW60GfFeGO7NG5mxilG+ =OzVV -----END PGP SIGNATURE----- --------------enig71B43A6879687BE1681E56BA--