From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MJDxV-0006c8-MV for mharc-grub-devel@gnu.org; Tue, 23 Jun 2009 17:55:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJDxU-0006bm-B7 for grub-devel@gnu.org; Tue, 23 Jun 2009 17:55:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJDxQ-0006bZ-SU for grub-devel@gnu.org; Tue, 23 Jun 2009 17:55:16 -0400 Received: from [199.232.76.173] (port=43020 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJDxQ-0006bW-PR for grub-devel@gnu.org; Tue, 23 Jun 2009 17:55:12 -0400 Received: from aybabtu.com ([69.60.117.155]:39704) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJDxQ-0002jI-AS for grub-devel@gnu.org; Tue, 23 Jun 2009 17:55:12 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MJCuH-0007Vb-Rv for grub-devel@gnu.org; Tue, 23 Jun 2009 22:47:54 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MJDxM-0002lP-0a for grub-devel@gnu.org; Tue, 23 Jun 2009 23:55:08 +0200 Date: Tue, 23 Jun 2009 23:55:07 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090623215507.GA10614@thorin> References: <20090622234859.GA16795@thorin> <1245721895.809.18.camel@mj> <20090623115027.GC24028@thorin> <1245791842.3204.8.camel@mj> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1245791842.3204.8.camel@mj> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: Re: [PATCH] search -d|--disk 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: Tue, 23 Jun 2009 21:55:16 -0000 On Tue, Jun 23, 2009 at 05:17:22PM -0400, Pavel Roskin wrote: > > > > QEMU has a feature in which you can specify the boot drive from command > > line (-boot parameter). After i386-qemu port is merged, I plan to add > > some code to read this from CMOS and export it to some variable. > > > > When on GRUB, it is up to the user to decide what "boot this drive" means. > > An interesting option is to search for a specific file in the disk we're told, > > and then act upon it (e.g. configfile /grub.cfg, multiboot /grub.elf, > > linux /vmlinuz, whatever). > > I think the convention is to load the first sector of the disk. That's the BIOS convention, which is useful when there's a BIOS. Otherwise there isn't much you can do with 512 bytes of code. > Maybe we could pass > environment variables using some qemu facility. Yes, qemu exports -boot parameter to CMOS, just like memory size. GRUB can read it from there. > > I implemented it only for files. It's trivial to do it for labels/uuids > > too, but it's annoying because doing so results in code duplication. > > Yes, it's annoying, but partial implementations are annoying to the end users. > > Perhaps it should be possible to implement disk filtering using the > mechanism used to skip floppies. I'll see what I can do. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."