From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LlP8t-0007EV-OA for mharc-grub-devel@gnu.org; Sun, 22 Mar 2009 10:59:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlP8s-0007DH-DU for grub-devel@gnu.org; Sun, 22 Mar 2009 10:59:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlP8q-0007Cl-Ge for grub-devel@gnu.org; Sun, 22 Mar 2009 10:59:13 -0400 Received: from [199.232.76.173] (port=48477 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlP8q-0007Ca-E9 for grub-devel@gnu.org; Sun, 22 Mar 2009 10:59:12 -0400 Received: from mail.nexedi.com ([91.121.25.85]:33577 helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlP8p-0003UR-Qe for grub-devel@gnu.org; Sun, 22 Mar 2009 10:59:12 -0400 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id C25103D9EF for ; Sun, 22 Mar 2009 15:59:09 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 22 Mar 2009 23:59:03 +0900 User-Agent: KMail/1.9.10 References: <49C63395.9090304@gmail.com> <200903222301.41688.okuji@enbug.org> <49C648DD.1020607@gmail.com> In-Reply-To: <49C648DD.1020607@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903222359.03756.okuji@enbug.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Move loader.c out of the kernel 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, 22 Mar 2009 14:59:14 -0000 On Sunday 22 March 2009 23:19:09 phcoder wrote: > Yoshinori K. Okuji wrote: > > On Sunday 22 March 2009 22:30:24 phcoder wrote: > >> Yoshinori K. Okuji wrote: > >>> On Sunday 22 March 2009 22:06:36 phcoder wrote: > >>>> Yoshinori K. Okuji wrote: > >>>>> On Sunday 22 March 2009 21:48:21 phcoder wrote: > >>>>>> Hello. Now when boot command isn't in kernel anymore I don't see why > >>>>>> loader.c stays in kernel. Here is the patch to move it to boot.mod > >>>>> > >>>>> This is not useful in reality, because the loader interface needs to > >>>>> be pre-loaded into core.img anyway. > >>>> > >>>> Why? I successfully tested core.img with just pc fat and biosdisk > >>>> modules integrated. It loads boot.mod just fine and boots linux and > >>>> multiboot with no problem > >>> > >>> Try the rescue mode with no extra module loaded. If the core.img does > >>> not have any loader, it is useless. > >> > >> If it's unable to read FS then it can't boot much anyway. If it's it can > >> load modules from its own partition. The only use I see is when grub > >> partition is corrupted but OS one is intact and you already have FS > >> driver for root in grub2. > >> Alternatively commands/boot.c can be a part of minicmd > > > > "cannot load any more module" != "cannot read the filesystem" > > > > The most typical case is where the user has failed in installing GRUB > > correctly; in this case, the user can still reset the prefix, and load > > normal.mod manually. But, surprisingly, some users accidentally remove > > modules. Indeed, I have heard many times this kind of "bug reports" in > > GRUB Legacy. In this case, the only way is to boot an OS somehow and > > re-install GRUB. > > Well if user damages grub2 then we can't do much. He can also accidently > rewrite mbr or first track (some non-booting-realted software does it > on purpose). I know that this is very rare by experience, in comparison with just having removed/broke many things from/in a filesystem. > For failsafe solution only cd is a viable alternative If you have experience on maintaining remote hardware, you should know that this is not viable. > grub-install already handles the correct installation of grub2. > Additionally if user has "accidently" deleted modules chances are he > used grub-install or some wrapper around it. But grub-install doesn't > put any loader modules to core.img. grub-install itself does whatever the user specifies. If your core.img does not include necessary modules pre-loaded, that's your mistake or your distributor's. Regards, Okuji