Grub2, chroot, initramfs
Hi,
I'm trying out grub2 for the first time on my old laptop. I'm following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start which seems easy enough. Basically just emerge it, install and go. However... two different questions: When I did this from a chroot, I just got the GRUB> prompt upon rebooting... no menu or anything. I can manually type "linux /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run grub2-mkconfig from within the chroot, I don't get any "Found linux image" lines. It does not create /boot/grub2/grub.cfg but rather grub.cfg.new. So I don't know if it's confused about where /boot is or what. Is there a trick to installing/updating grub2 config from within a chroot? Second, when running grub2-mkconfig from within my working gentoo system, it fails with "error: failed to get canonical path of /dev/root." which is apparently because I don't use an initramfs. I must manually run "ln -s /dev/sda3 /dev/boot" before it will work. Is there any trick to avoid having to do that every time? For now I have simply added that to my after-kernel-update script but I'm curious to know if grub2 knows how to handle this on its own somehow. Thanks, Paul Wed May 16 06:30:02 2012 Return-path: <devel-bounces@lists.fedoraproject.org> Envelope-to: tom@linux-archive.org Delivery-date: Wed, 16 May 2012 05:47:07 +0300 Received: from bastion01.fedoraproject.org ([209.132.181.2]:58459 helo=bastion.fedoraproject.org) by s2.java-tips.org with esmtp (Exim 4.77) (envelope-from <devel-bounces@lists.fedoraproject.org>) id 1SUUGZ-000167-PI for tom@linux-archive.org; Wed, 16 May 2012 05:47:07 +0300 Received: from lists.fedoraproject.org (collab03.vpn.fedoraproject.org [192.168.1.70]) by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 515EC20E20; Wed, 16 May 2012 02:47:07 +0000 (UTC) Received: from collab03.fedoraproject.org (localhost [127.0.0.1]) by lists.fedoraproject.org (Postfix) with ESMTP id 705A940A90; Wed, 16 May 2012 02:47:05 +0000 (UTC) X-Original-To: devel@lists.fedoraproject.org Delivered-To: devel@lists.fedoraproject.org Received: from smtp-mm01.fedoraproject.org (smtp-mm01.fedoraproject.org [80.239.156.217]) by lists.fedoraproject.org (Postfix) with ESMTP id 4FF4340A67 for <devel@lists.fedoraproject.org>; Wed, 16 May 2012 02:47:03 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by smtp-mm01.fedoraproject.org (Postfix) with ESMTP id 06AA5C02EF for <devel@lists.fedoraproject.org>; Wed, 16 May 2012 02:47:01 +0000 (UTC) Received: by obbwd20 with SMTP id wd20so486642obb.32 for <devel@lists.fedoraproject.org>; Tue, 15 May 2012 19:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=kTzj2WXL/ZgoZ8TLGGgH/mTJyXizifp5rF+W95+9i9w=; b=rQ0nlegEU6yLrdDnzTPBpI7hkKB19rwLK26dA7SUjtWzdBLQ tEJnR0oZUOy5SG4AP6 8rxrq3X/eDfFuY8ZhZthBCX7xlvuRSorV4RyNvO3JbsRqnv2355DORW/pF1p8RmTMsgc raoel5MlM0cjW5/glDgZM1bbZCVnqesMM+REMA7+hvRtB4IH3qtSCx9DsvWqHS99N nED dGzK5x7ie3GxvmqI/FownT9pxESI1/xKxSDAYog8znaXi22wg3IbxxzWUI0JRLv3v/eN q+W/6kWC7ejyK8kDPcebVo3VO+E7gWzMWTuptguyIlKkY/LQOV8y+NMY9PqyJKfRQTvq Ythg== MIME-Version: 1.0 Received: by 10.60.9.170 with SMTP id a10mr1252218oeb.14.1337136422557; Tue, 15 May 2012 19:47:02 -0700 (PDT) Received: by 10.182.57.168 with HTTP; Tue, 15 May 2012 19:47:02 -0700 (PDT) Date: Tue, 15 May 2012 23:47:02 -0300 Message-ID: <CAHAq8pF62did6fsCGDvZ+M=aGBDNpHENK1ms+w3Ncp5yY8e2 0A@mail.gmail.com> Subject: rpmlib(X-CheckUnifiedSystemdir) is needed by filesystem-3-2.fc17.x86_64 From: =?ISO-8859-1?Q?Paulo_C=E9sar_Pereira_de_Andrade?= <paulo.cesar.pereira.de.andrade@gmail.com> To: Development discussions related to Fedora <devel@lists.fedoraproject.org> X-BeenThere: devel@lists.fedoraproject.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Development discussions related to Fedora <devel@lists.fedoraproject.org> List-Id: Development discussions related to Fedora <devel.lists.fedoraproject.org> List-Unsubscribe: <https://admin.fedoraproject.org/mailman/options/devel>, <mailto:devel-request@lists.fedoraproject.org?subject=unsubscrib e> List-Archive: <http://lists.fedoraproject.org/pipermail/devel/> List-Post: <mailto:devel@lists.fedoraproject.org> List-Help: <mailto:devel-request@lists.fedoraproject.org?subject=help> List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/devel>, <mailto:devel-request@lists.fedoraproject.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: devel-bounces@lists.fedoraproject.org Errors-To: devel-bounces@lists.fedoraproject.org ICBJIGtub3cgSSBnb3Qgd2hhdCBJIGRlc2VydmVkIGJ5IGF0dG VtcHRpbmcgdG8gImZpeCIgYnkg aGFuZCB0aGUgbW92ZQpmcm9tIC8gdG8gL3VzciwganVzdCBkaW QgbmVlZCB0byBib290IGZyb20g dGhlIGZlZG9yYTE2IGR2ZCwgbW91bnQgbHZtCnJvb3QgYW5kIG ZpbmlzaCBteSAiZml4IjsgYnJh aW4gZmFydCwgYW5kIGN5Y2xpYyBkZXAgb24gbW92aW5nIC9saW I2NAp0byAvdXNyL2xpYjY0IGFu ZCB0aGVuIGEgc3ltbGluaywgbGVhdmluZyBpdCB3aXRoIGFsbC BiaW5hcmllcyBmYWlsaW5nCmR1 ZSB0byBtaXNzaW5nIC9saWI2NC9sZC1saW51eC14ODYtNjQuc2 8uMi4KICBBZnRlciB0aGF0LCB3 aGlsZSBpdCBpcyBmaW5pc2hpbmcgdXBkYXRpbmcgdG8gcmF3aG lkZSByaWdodCBub3csIEkgZGlk CmdvIHNlYXJjaCBmb3IgZG9jdW1lbnRhdGlvbiwgYnV0IHN0aW xsIGZpbmQgdGhhdApodHRwczov L2ZlZG9yYXByb2plY3Qub3JnL3dpa2kvVXBncmFkaW5nX0ZlZG 9yYV91c2luZ195dW0jRmVkb3Jh XzE2Xy0uM0VfRmVkb3JhXzE3CmlzIG5vdCBtdWNoIGNsZWFyIG Fib3V0IGl0LiBNYXliZSBzaG91 bGQgc3Ryb25nbHkgYWR2aXNlIGluc3RhbGxpbmcKYnVzeWJveC BhbmQvb3IgaGF2ZSBhIHN0ZXAg Ynkgc3RlcCBwcm9jZWR1cmUuIE9yIGV2ZW4gYmV0dGVyLCB0by Bzb21laG93CmhhdmUgaXQgZG9u ZSBhdXRvbWF0aWNhbGx5LCBieSBzb21lIHN0YXRpY2FsbHkgbG lua2VkIHByb2dyYW0uCgogIFRo aXMgc2hvdWxkIGhhdmUgYmVlbiBhbHJlYWR5IGRpc2N1c3NlZC B0byBkZWF0aCwgYnV0IEkgZm91 bmQgd29ydGggdG8KcG9zdCBhIG5vdGUgYWJvdXQgaXQgYXMgSS BhbSBzb21ld2hhdCBvZiBhIG5l d2NvbWVyIHRvIGZlZG9yYS4uLgoKUGF1bG8KLS0gCmRldmVsIG 1haWxpbmcgbGlzdApkZXZlbEBs aXN0cy5mZWRvcmFwcm9qZWN0Lm9yZwpodHRwczovL2FkbWluLm ZlZG9yYXByb2plY3Qub3JnL21h aWxtYW4vbGlzdGluZm8vZGV2ZWw= |
Grub2, chroot, initramfs
On 15 May 2012 19:37, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> Hi, > > I'm trying out grub2 for the first time on my old laptop. I'm > following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start > which seems easy enough. Basically just emerge it, install and go. > > However... two different questions: > > When I did this from a chroot, I just got the GRUB> prompt upon > rebooting... no menu or anything. I can manually type "linux > /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run > grub2-mkconfig from within the chroot, I don't get any "Found linux > image" lines. It does not create /boot/grub2/grub.cfg but rather > grub.cfg.new. So I don't know if it's confused about where /boot is or > what. Is there a trick to installing/updating grub2 config from within > a chroot? I don't really understand where the chroot comes into this but ... did you add the "-o /boot/grub2/grub.cfg" part? I forgot that bit a few times and then couldn't figure out why my changes weren't taking effect. :-) > Second, when running grub2-mkconfig from within my working gentoo > system, it fails with "error: failed to get canonical path of > /dev/root." which is apparently because I don't use an initramfs. I > must manually run "ln -s /dev/sda3 /dev/boot" before it will work. Is > there any trick to avoid having to do that every time? For now I have > simply added that to my after-kernel-update script but I'm curious to > know if grub2 knows how to handle this on its own somehow. > > Thanks, > Paul > |
Grub2, chroot, initramfs
On Tue, May 15, 2012 at 9:53 PM, Hilco Wijbenga
<hilco.wijbenga@gmail.com> wrote: > On 15 May 2012 19:37, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote: >> Hi, >> >> I'm trying out grub2 for the first time on my old laptop. I'm >> following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start >> which seems easy enough. Basically just emerge it, install and go. >> >> However... two different questions: >> >> When I did this from a chroot, I just got the GRUB> prompt upon >> rebooting... no menu or anything. I can manually type "linux >> /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run >> grub2-mkconfig from within the chroot, I don't get any "Found linux >> image" lines. It does not create /boot/grub2/grub.cfg but rather >> grub.cfg.new. So I don't know if it's confused about where /boot is or >> what. Is there a trick to installing/updating grub2 config from within >> a chroot? > > I don't really understand where the chroot comes into this but ... did > you add the "-o /boot/grub2/grub.cfg" part? I forgot that bit a few > times and then couldn't figure out why my changes weren't taking > effect. :-) Hehe, yeah, I used that command. I'm installing it from chroot for the first time because gentoo's bootloader was not yet present on the machine (only Windows7). |
Grub2, chroot, initramfs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 16.05.2012 04:37, Paul Hartman wrote: > Hi, > > I'm trying out grub2 for the first time on my old laptop. I'm > following the guide at: > https://wiki.gentoo.org/wiki/GRUB2_Quick_Start which seems easy > enough. Basically just emerge it, install and go. > > However... two different questions: > > When I did this from a chroot, I just got the GRUB> prompt upon > rebooting... no menu or anything. I can manually type "linux > /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I > run grub2-mkconfig from within the chroot, I don't get any "Found > linux image" lines. It does not create /boot/grub2/grub.cfg but > rather grub.cfg.new. So I don't know if it's confused about where > /boot is or what. Is there a trick to installing/updating grub2 > config from within a chroot? > > Second, when running grub2-mkconfig from within my working gentoo > system, it fails with "error: failed to get canonical path of > /dev/root." which is apparently because I don't use an initramfs. > I must manually run "ln -s /dev/sda3 /dev/boot" before it will > work. Is there any trick to avoid having to do that every time? For > now I have simply added that to my after-kernel-update script but > I'm curious to know if grub2 knows how to handle this on its own > somehow. > > Thanks, Paul > If I recall correctly you need to mount /sys for grub2 to sucessfully detect devices. mount -o bind /sys <path-to-gentoo/sys should suffice. proc and dev should be mounted according to the manual. If you use a /boot- partition mount it, when you are inside the chroot. Doing so it worked like a charm for all devices I installed that way (3 in the last 3 months, if I recall correctly). With kind regards, Hinnerk -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPs2UIAAoJEJwwOFaNFkYcgrcIALVB1QY/HOX/xkDesJkRSLjS rvK4m/WDde6FsmT2B3XSSZ9W6aVAfdJO8+GM+0MolpRT64fp7wNtAr0y aV4ALRr8 tNxk0YqWXPcSmh4LIsagKKnMuCCajHXZMK7AWPqnyAtifKPlP1 4j4H2T9cNegPvz doR9DF2sU/TPyCzVrvq1ouMelXkao9EC7ejQ39nnZ12PrxrdqapITpkqjJ2O uTOn NylZS6HQnZw+A8uLVuUD+Mclu/Z+sRbSEUAQelHSDe3knA7MZTkeXBrUoKj4g63r 2YRnrJACxeeJkIVxGOuVTQIT7a0A5TZHzMiv8wWTbIfDstPUBk Gd3iV6Jvl3ndM= =tTo+ -----END PGP SIGNATURE----- |
| All times are GMT. The time now is 12:05 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.