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 1SbdKH-0006SI-3W for garchives@archives.gentoo.org; Mon, 04 Jun 2012 19:52:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C5F6EE0A92; Mon, 4 Jun 2012 19:52:14 +0000 (UTC) Received: from mx1.hadt.biz (boss.hadt.biz [78.47.36.129]) by pigeon.gentoo.org (Postfix) with ESMTP id A7A1CE0A5A for ; Mon, 4 Jun 2012 19:50:15 +0000 (UTC) Received: from [192.168.255.100] (p5B343A19.dip.t-dialin.net [91.52.58.25]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.hadt.biz (Postfix) with ESMTPSA id 27A5B6E65 for ; Mon, 4 Jun 2012 21:50:14 +0200 (CEST) Message-ID: <4FCD1175.20309@hadt.biz> Date: Mon, 04 Jun 2012 21:50:13 +0200 From: Michael Hampicke User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120530 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: ffdfcb61-e7a1-4668-828e-7d6d4f4a3d9b X-Archives-Hash: 7028ba13df0e10924ff20ebc74ed0e60 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=" 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 root= >> to my root partition and then the initramfs won't get used. >> >> I think manually editing /boot/grub2/grub.cfg and deleting the root= >> 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. Paul is right, but you shouldn't need to modify anything. Here's what grub2-mkconfig generates on my machine (first entry only): 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=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 e39917c2-b59e-4447-bcae-39a41c3816a7 else search --no-floppy --fs-uuid --set=root 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=UUID=713f1c17-1b9a-4967-ac05-d6a6a9ff60a5 ro echo 'Loading initial ramdisk ...' initrd /initramfs-genkernel-x86_64-3.3.5-gentoo } 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 It boots perfectly fine using my initramfs