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 1QuPSY-0001Qu-8I for garchives@archives.gentoo.org; Fri, 19 Aug 2011 13:50:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1FD2921C2CD; Fri, 19 Aug 2011 13:49:57 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 2753A21C2DF for ; Fri, 19 Aug 2011 13:48:57 +0000 (UTC) Received: by wyg36 with SMTP id 36so2843437wyg.40 for ; Fri, 19 Aug 2011 06:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding:content-type; bh=vaXVuYf8tE5umvTwEbH0e0x48veGNzI0gjKVGvUU1fQ=; b=c+/l3xwSWDmOxkkZtSCdw3Woqftz2vWCKExJqdgWFH/3pN0tn8t/V3wd3GbpR+wIVo rb74jKxQvfvfr3KZ4NKiFlZV3rsGmvH3CE3wSetAadyleAaw2SHsQEMwPMQs/e+artaZ Fl9P7tMuW6A5H42YSTHOebLNo7804ovCK53u0= Received: by 10.227.11.75 with SMTP id s11mr1720984wbs.10.1313761737299; Fri, 19 Aug 2011 06:48:57 -0700 (PDT) Received: from nazgul.localnet (dustpuppy.is.co.za [196.14.169.11]) by mx.google.com with ESMTPS id 8sm2606201wbx.0.2011.08.19.06.48.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 06:48:56 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Cc: frares@gmail.com Subject: Re: [gentoo-user] /dev/sda* missing at boot Date: Fri, 19 Aug 2011 15:48:45 +0200 Message-ID: <1439087.joxse6lcPE@nazgul> User-Agent: KMail/4.7.0 (Linux/2.6.39-ck-r2; KDE/4.7.0; x86_64; ; ) In-Reply-To: <20cf30563e9305fe3504aadb7be7@google.com> References: <20cf30563e9305fe3504aadb7be7@google.com> 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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Archives-Salt: X-Archives-Hash: 3f1b5bf74c4d6f56967a00090f38d2b8 On Fri 19 August 2011 13:12:25 frares@gmail.com did opine thusly: > I the case I don't need a initram, I guess that the grub line for > parameter passing to the kernel would be empty. Am I wrong? Yes. Using or not using kernel parameters has nothing to do with whether you use an initramfs or not. It's the initrd line in grub you do not need. > > I was just looking on how to build my own initram. What is it > supposed to do anyway? First, it's initramfs (the previous incarnation was initrd). You should use the correct name. An initramfs is a filesystems image stored on disk in a place that grub can find. It contains a kernel, essential drivers and other bits and pieces. When booting, grub finds the image, bangs it into memory and instructs the cpu to start executing at a known point. Why is this useful? For Gentoo it usually isn't (there are times when it is - see below). Binary distros like Ubuntu and Fedora absolutely require this. These distros do not know what hardware you have and what drivers you require, so they supply drivers for everything. But Ubuntu cannot possibly compile into the kernel every possible driver you might need to boot as the list would be huge (every known floppy, CD, USB, every known MFM, IDE, SATA, SCSI, netboot, Fibre and more driver for a start), so what they do instead is probe the hardware at boot time, find out what you have, and load the driver modules you DO need. This is the problem. The kernel wants to load disk drivers so that it can access the disk and continue booting. Where are the drivers? Well, they are on the disk. Oops, circular problem. The difficulty is not finding and loading drivers, it's how do you get the disk driver off the disk before you have the disk driver in memory? (think chicken and egg here). An initramfs solves this nicely. Grub shoved a disk image into memory when it booted. The kernel knows how to access it's memory it doesn't need a driver for that. And now the files containing the needed drivers are on a virtual disk *in memory*. The kernel loads them, and can now access the real physical disks. Lots more complicated stuff then happens, like getting rid of the virtual filesystem from the initramfs and mounting the real filesystem from disk at /, but that's beyond the scope of this mail. Gentoo mostly doesn't need any of this because you do know your hardware and can just compile your disk drivers into the kernel - this is the very thing that Ubuntu cannot do. Some Gentoo users still need an initramfs, such as booting off drives in a RAID configuration. They need the RAID drivers first to read the disks so use an initramfs to fix this little problem exactly as Ubunut fixes their problem. Make sense? -- alan dot mckinnon at gmail dot com