From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1E5rJu-0006gv-Ql for garchives@archives.gentoo.org; Thu, 18 Aug 2005 20:49:03 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7IKlsek007683; Thu, 18 Aug 2005 20:47:54 GMT Received: from kelly.nerdshack.com (kelly.nerdshack.com [209.189.235.40]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7IKiErH020567 for ; Thu, 18 Aug 2005 20:44:14 GMT Received: from dispatchd.nerdshack.com (julie.nerdshack.com [209.189.235.39]) by kelly.nerdshack.com (Postfix) with SMTP id 6FFF59036D for ; Thu, 18 Aug 2005 15:41:32 -0500 (CDT) Received: from 192.168.1.12 (dhilary.demon.co.uk [62.49.25.24]) by mail.nerdshack.com with ESMTP Thu, 18 Aug 2005 15:40:20 -0500 Message-ID: <4304F28F.8080201@mailshack.com> Date: Thu, 18 Aug 2005 21:41:51 +0100 From: Ognjen Bezanov User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050507) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Help with ramdisk References: <43036B05.2090705@mailshack.com> <4303E24F.1040505@asmallpond.org> In-Reply-To: <4303E24F.1040505@asmallpond.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: e219fd34-438e-4b14-b983-8ab4c4335da2 X-Archives-Hash: 569b0c13cc9d1a70c006cd8d9abb834c Richard Fish wrote: > Is this an initrd or initramfs (aka, cpio.gz) image? > > If it is initrd, you should have a /linuxrc script to initialize the > system. For grub, you will need: > > kernel /vmlinuz root=/dev/ram0 init=/linuxrc > initrd=/rootfs.gz > > Then your linuxrc script must *not* exit. It will probably need to > call /sbin/init with something like: > > exec /sbin/init $@ > > In your case, /linuxrc probably doesn't need to do much of anything else. > > > If it is initrams, then you just need to create a /init script and > place the same "exec /sbin/init..." inside it. You do not need the > init= option for the kernel in the grub configuration. > > For some more info, take a look at > /usr/src/linux/Documentation/early-userspace/README > > HTH > > -Richard > > Ognjen Bezanov wrote: > >> Hi all, >> >> Im building an x86 embedded distro using gentoo. Now i have been rather >> successful. I have built the whole system and it works, while only >> taking up 9mb (when gzipped). >> >> Now my question is how to get linux to load the gzipped image file into >> a ramdisk and use it as a root filesystem. >> >> Running the system directly from the CF card works great, but when >> trying to get it to run it in ram it fails >> with "kernel panic: VFS: Unable to mount root fs on unknown-block(1,0)". >> >> My attempt at running the system from ram is as follows: >> >> (grub config file): >> >> kernel /vmlinuz initrd=/rootfs.gz root=/dev/ram0 >> >> the rootfs.gz file is ~10Mb, and when uncompressed is an 100mb image >> (most of the image is free space to >> allow for future additions, this is a test bed). >> >> >> Now I presume this is probably what is incorrect, in which case can >> anyone help me regarding how to use >> ramdisks as root devices. (googling about tells me that the initrd image >> is not the root image, but rather >> a pre-root mounting fs to prepare the system for booting). >> >> P.S Please CC me as this mailinglist doesnt play nice with my email >> account. thanks! >> >> >> > Thanks, that was helpful. Now the system finds the root fs and loads it. But the system still wont boot. It tells me "RAMDISK: Compressed image found at block 0" as a final kernel message, then just sits there (for ages). At lease its closer to functioning then before, but there are a few bugs to iron out. What could be wrong? Thanks in advance -- gentoo-user@gentoo.org mailing list