Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1DwloU-0005mU-8q for mharc-grub-devel@gnu.org; Sun, 24 Jul 2005 15:07:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DwloR-0005lM-MX for grub-devel@gnu.org; Sun, 24 Jul 2005 15:06:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dwlls-00050T-3K for grub-devel@gnu.org; Sun, 24 Jul 2005 15:04:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dwllo-0004t2-Dp for grub-devel@gnu.org; Sun, 24 Jul 2005 15:04:16 -0400 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DwldQ-0004RI-NF for grub-devel@gnu.org; Sun, 24 Jul 2005 14:55:36 -0400 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 90DD2FF26F6F for ; Sun, 24 Jul 2005 20:44:52 +0200 (CEST) Received: from 127.0.0.1 ([127.0.0.1] helo=ip6-localhost) by ASSP-nospam ; 24 Jul 05 18:44:52 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 24 Jul 2005 20:44:19 +0200 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507242044.19861.okuji@enbug.org> Subject: grub-install 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: Sun, 24 Jul 2005 19:07:00 -0000 I have mostly implemented grub-install as a shell script. I just copied it from GRUB Legacy then adapted it to GRUB 2. This script is much simpler in GRUB 2, because grub-setup handles most things. It has one remaining issue, and I'm not sure what is appropriate for this. Since the core image in GRUB 2 is generated dynamically, it is necessary to specify what modules should be included in it. When the user uses grub-install, I believe that they should be automatically determined. For now, pc.mod and _chain.mod are hardcoded. I think these are good enough for PC. It might be better to add _linux.mod on GNU/Linux, though. I'm not sure. The issue is how to determine a filesystem module which is needed to load more modules. I think there are three ways: 1. Shell scripting. Probably it is possible to write a shell function which detects a filesystem by using df, mount, etc. I do not like this approach very much, because the installation environment can be very minimalistic (suppose when you install an OS using a floppy), and the behaviors of commands are sometimes not clever enough. 2. Adding an option into grub-mkimage to add a filesystem module automatically, depending on the filesystem of a grub directory. This is not bad, but this makes grub-mkimage a bit complex. 3. Adding a new utility which detects an appropriate filesystem module for a given directory. This is not bad, but this sounds a bit overkill. What do you think? Okuji