Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JTeOA-0002ln-8B for mharc-grub-devel@gnu.org; Mon, 25 Feb 2008 09:33:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTeO6-0002jk-GM for grub-devel@gnu.org; Mon, 25 Feb 2008 09:33:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTeO4-0002jA-VY for grub-devel@gnu.org; Mon, 25 Feb 2008 09:33:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTeO4-0002j3-Se for grub-devel@gnu.org; Mon, 25 Feb 2008 09:33:00 -0500 Received: from ti-out-0910.google.com ([209.85.142.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JTeO4-0001kR-4N for grub-devel@gnu.org; Mon, 25 Feb 2008 09:33:00 -0500 Received: by ti-out-0910.google.com with SMTP id a20so964513tia.10 for ; Mon, 25 Feb 2008 06:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=g32exnnVgEkXNfQ1EfhJJBbwf5L9RpKhpLfzX8uk7JY=; b=NAaym378Zl7WyXRYemyj7GOo8k3/1bDYakWL1ozAORwqf+SbMGfZS/0/XsO6WbK13UDoPJuog9wtodbMpol/Mg4Bn2eBK2ftuA4iHmt6O5Ihob3ms/kGLIhkzt/KOFJA0GL71qDWQ3ka8B6pwVjxhgTyYebDRWVt5pSHpAQlzws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=U4rhcCsHvI2mQeamW8v84iCTynA0drBn10gsjH8NuawqrppZ/MDT2NY0RswD8Fh8dGEWzLbjs7oW8zXsmtTlQ/5CIdYzDOrzcfoOQtH6mh03LhwPOnS/alKfN4l6Nxu3ln8PVWn8jBw1cs9h2401b7NH7Scs/kPK9b9x/1r0dkY= Received: by 10.110.46.14 with SMTP id t14mr2066482tit.15.1203949977632; Mon, 25 Feb 2008 06:32:57 -0800 (PST) Received: by 10.110.20.10 with HTTP; Mon, 25 Feb 2008 06:32:57 -0800 (PST) Message-ID: Date: Mon, 25 Feb 2008 22:32:57 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <1203948493.802.15.camel@dv> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080225021046.e0sy9t06o0o8gwcc@webmail.spamcop.net> <1203948493.802.15.camel@dv> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Handling command line option for core.img and g2ldr 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: Mon, 25 Feb 2008 14:33:03 -0000 On Mon, Feb 25, 2008 at 10:08 PM, Pavel Roskin wrote: > On Mon, 2008-02-25 at 15:50 +0800, Bean wrote: > > On Mon, Feb 25, 2008 at 3:10 PM, Pavel Roskin wrote: > > > Quoting Bean : > > > > > > > This patch allow passing command line options to core.img or g2ldr: > > > > > > Isn't it an overkill? When do you think it would be really needed in > > > practice? I don't feel good about adding code just because we can. > > Sorry, you lost the list from cc. Please feel free to re-add it. oh, i didn't notice it. > > Sometimes, the root device is complicated and can't be set using the > > rootdev, for example, (ata0,1), (memdisk). In this case, we need to > > set it explicitly using the root variable. Also, we can set the debug > > variable to see debug information. > > OK, fair enough, but I still don't see a scenario when it's needed. > > The best thing would be if this functionality could be used for the > normal boot somehow. Maybe some settings could be specified as > variables when GRUB is installed. > > I think the main reason for this is to load grub2 from other environment, like grub legacy. Allow setting variable have its advantage, for example, we can load two version of grub2, each with different setting: title boot grub2 kernel /core.img title boot grub2 (debug) kernel /core.img debug=all Also, some device, like (cd0), can't be set using traditional method, we must set the root variable in command line. title boot grub2 kernel /core.img root=(cd0) > > For linux kernel g2ldr, there is no way to set the root device, we > > must use command line. > > I'm not sure it's relevant here. It's not even part of GRUB, is it? g2ldr is created using lnxboot.img header: cat lnxboot.img core.img > g2ldr It's used to load grub2 from loaders that support linux kernel, but not multiboot, such as lilo, syslinux, etc. > > To sum up, I'm fine with any improvements to the loaders, allowing them > to pass more information to the kernels or whatever they load. > > I have reservations about changes that affect the GRUB core (not the > "normal" module), especially those requiring additional memory > allocation. I think this should be justified with some real world > example. Or there should be a way to improve the existing code. I don't know, is there other way to pass information to grub2 ? -- Bean