Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hypav-0005t3-Cg for mharc-grub-devel@gnu.org; Thu, 14 Jun 2007 09:42:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hypat-0005sV-UV for grub-devel@gnu.org; Thu, 14 Jun 2007 09:42:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hypas-0005re-7h for grub-devel@gnu.org; Thu, 14 Jun 2007 09:42:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hypar-0005rV-Vw for grub-devel@gnu.org; Thu, 14 Jun 2007 09:42:34 -0400 Received: from smtp-vbr14.xs4all.nl ([194.109.24.34]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hypar-0001PT-Ay for grub-devel@gnu.org; Thu, 14 Jun 2007 09:42:33 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id l5EDgVSg082734 for ; Thu, 14 Jun 2007 15:42:31 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20070614034649.GA591@ws3.vdp.com> <20070614060809.GA27145@aragorn> <20070614062451.GA591@ws3.vdp.com> <871wgex473.fsf@xs4all.nl> <20070614102419.GA633@ws3.vdp.com> <87sl8uvmix.fsf@xs4all.nl> <20070614113154.GA686@ws3.vdp.com> <87odjivjox.fsf@xs4all.nl> <20070614130809.GA736@ws3.vdp.com> Mail-Copies-To: mgerards@xs4all.nl Date: Thu, 14 Jun 2007 15:48:58 +0200 In-Reply-To: <20070614130809.GA736@ws3.vdp.com> (bean123@126.com's message of "Thu, 14 Jun 2007 21:08:09 +0800") Message-ID: <87fy4uve7p.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: FreeBSD 4.6-4.9 Subject: Re: Command extension suggestions X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2007 13:42:36 -0000 Bean writes: > On Thu, Jun 14, 2007 at 01:50:38PM +0200, Marco Gerards wrote: >> Bean writes: >> >> > On Thu, Jun 14, 2007 at 12:49:26PM +0200, Marco Gerards wrote: >> >> Well, I see the problem but I do not agree with the solution. >> >> >> >> The problem for GRUB 2 is that initrd is very linux specific. It's >> >> part of a loader. Perhaps we either have to extend loopback to load a >> >> file into memory on beforehand. Or add a memdisk disk or so. >> >> >> >> One problem with initrd is that it is very architecture specific. >> >> Another problem is that the initrd is unloaded when you load another >> >> kernel or OS. Besides that, reusing initrd appears hackish to me :-). >> > >> > I have another idea on this subject. First, We can extend the function of >> > grub-mkimage so that it can handle data files. The data files embed in >> > core.img can be accessed using a special device such as (ed). Then, we can >> > put all necessary files, such as modules, grub.cfg and other data files in >> > a single core.img. This kernel is self-sustaining, no extra file is needed >> > for it to function properly. >> >> This sounds good. In what way do you want to embed them? A >> filesystem image (for example minixfs)? Some simple archive? > > We can embed them the same way we embed modules. Just add a header: > > SIGNATURE > FILENAME > DATA > > SIGNATURE is used to distinguish data file from normal module, FILENAME is > used by the virtual device to identify the data. I will commit a patch soon that adds support for a dummy disk driver. In that case we just have to add a filesystem which offers access to this embedded data. I think this can even be done without changing the kernel a lot and adding this support in a module :-). I would welcome such patch :-) -- Marco