Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1BWClc-0006CY-MQ for mharc-grub-devel@gnu.org; Fri, 04 Jun 2004 07:21:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BWClb-0006CT-Qn for grub-devel@gnu.org; Fri, 04 Jun 2004 07:21:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BWClb-0006CH-1e for grub-devel@gnu.org; Fri, 04 Jun 2004 07:21:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BWCla-0006CE-VU for grub-devel@gnu.org; Fri, 04 Jun 2004 07:21:42 -0400 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BWCkr-000775-HE for grub-devel@gnu.org; Fri, 04 Jun 2004 07:20:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 1D78F15F54840 for ; Fri, 4 Jun 2004 07:20:55 -0400 (EDT) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 4 Jun 2004 13:24:41 +0200 User-Agent: KMail/1.5.3 References: <20040601121704.GA4680@artax.karlin.mff.cuni.cz> <200406031312.39832.okuji@enbug.org> <20040603125006.GA7927@artax.karlin.mff.cuni.cz> In-Reply-To: <20040603125006.GA7927@artax.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200406041324.42057.okuji@enbug.org> Subject: Re: normal vs. rescue mode commands X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.4 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: Fri, 04 Jun 2004 11:21:44 -0000 On Thursday 03 June 2004 14:50, Tomas Ebenlendr wrote: > I think that loaders will have common code for both modes. And so > there can be wrapper (which will be in normal mode) to provide this > commands to normal mode. And the loaders themself need not to have > normal mode commands if the rescue commands (including their > descriptions) will be accessible from normal mode. That's right, as long as we can use the same loaders... > Yes there are some restrictions, for example those commands will not > be such fancy as normal mode commands. But should be commands as > 'initrd' fancy? My experience tells me that users will want to have more than expected. So I won't be surprised when users send feature requests that initrd should do something incredible. Indeed, there is an unofficial patch for initrd, which makes an initrd image dynamically by adding arbitrary kernel modules at run time. This makes me afraid that anything possible will happen. The difficulty in this issue is that most loaders should be identical between the two modes but probably not all loaders can be, due to the size limitation. For example, Multiboot Specification has many optional features now, such as VESA support. If this does not fit to rescue mode, we need to use different loaders for Multiboot. I guess this probablity is quite high. So I'd like to propose some solutions for this: 1. Generate two versions for each loader from the same source code. This case compiles the same source code twice to generate two different loaders for rescue mode and normal mode. Basically, the version for rescue mode would be a subset of the version for normal mode. This makes redundant binary code, but the maintainability is not very bad. 2. Share the same loaders if possible, and make different soure code if not possible. If a loader can be shared between rescue mode and normal mode, we make it as a rescue mode loader and use it from normal mode as well. If this is not possible, we make a different loader specific for normal mode. My intuition is that this is quite unmaintainable, because things are not consistent. 3. Use only a chainloader in rescue mode. The others require normal mode. This is what I thought at the beginning of this project. Because chainloader can be quite compact and so convenient if you have any other boot loader installed in your system, chainload might suffice for rescue purpose. In this case, we just forget sharing loaders. Only chainloader must be implemented for rescue mode and normal mode. Any idea? Okuji