Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K1LX6-0000Wv-6u for mharc-grub-devel@gnu.org; Wed, 28 May 2008 09:17:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1LX4-0000Vp-FV for grub-devel@gnu.org; Wed, 28 May 2008 09:17:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1LX2-0000UQ-UN for grub-devel@gnu.org; Wed, 28 May 2008 09:17:34 -0400 Received: from [199.232.76.173] (port=55615 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1LX2-0000UN-Oz for grub-devel@gnu.org; Wed, 28 May 2008 09:17:32 -0400 Received: from py-out-1112.google.com ([64.233.166.183]:18314) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K1LX2-0000Y6-T2 for grub-devel@gnu.org; Wed, 28 May 2008 09:17:33 -0400 Received: by py-out-1112.google.com with SMTP id p76so1823920pyb.1 for ; Wed, 28 May 2008 06:17:31 -0700 (PDT) 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:mime-version:content-type:content-transfer-encoding:content-disposition; bh=ibfgG7+BdeNVMaY/cJnF+XB1X3Edu+XXYCC5ZGvxj94=; b=szl0kArKHsLVJElEOX6Yk+FsjT4AT9A2NpN8k6bxnBHeQFHcBojIEcwQm4YiS3/fuCQl5fpfA2N3Uwnx9Zj9XTIeaqh74AY6QVxnayYxwLQAB70lfnhbrUWw23kh/fK9gfrl8J5P76NbUhQUruNyFzkuCM5XnpdIV4/MKh4Zezs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=j0kyFtyewqvGu72FwqTWSkZDN5EjL2H08RdPetGGfJ+a3/HeivagPCSjCaKTRaLaFhybPJVHQhFaPX777dlg/pVw22DZM7hmvTrf3BNUP+N7EfjQ0A9whgZbIRlWqeimULQnIfzvzynGe0x174UWXGgNejbhRWlhJqBCNqf9Sdg= Received: by 10.140.178.21 with SMTP id a21mr294424rvf.209.1211980650994; Wed, 28 May 2008 06:17:30 -0700 (PDT) Received: by 10.140.162.3 with HTTP; Wed, 28 May 2008 06:17:30 -0700 (PDT) Message-ID: Date: Wed, 28 May 2008 15:17:30 +0200 From: "=?UTF-8?Q?Javier_Mart=C3=ADn?=" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: Replacing the legacy 'map' command 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: Wed, 28 May 2008 13:17:34 -0000 > The cooperation between modules is not hard, but I think > map -first (hdx) will be more useful. Such command just swaps hd0 and hdx > drives. This also covers the scenarios when we chainload something else > than first sector of given partition. > > And maybe we can also consider following syntax: > map -pos (hd2) (hd0) (hd4) > with meaning: > hd0->hd1, > hd1->nothing > hd2->hd0, > hd3 not touch, > hd4->hd2 > I.e. positional syntax, first argument is mapped to (hd0), second to (hd1), > and so on. > > This syntax will be sufficient most times and writing > chainloader --automap (hd1,0)+1 > is same as writing > map -first (hd1) > chainloader (hd1,0)+1 > or > setting grub root to (hd1,0) > map -root > chainloader +1 > > -- > Tomas Ebenlendr Well, such "additional" UIs will be useful, and there seems to be some consensus on how this should be done: 1.- There should be a new command called somethink like "drivemap" and based on a new module that would provide the drive mapping capabilities. 2.- This module would be available in x86/PC (and, if it is ever split from it, AMD64/PC), and would work by saving the user requested mappings and installing a pre-boot GRUB routine. 3.- Such a routine would, before the execution of grub_X_real_boot, install the appropate ISRs (which are mostly available in GRUB Legacy code) to make the mappings effective, no matter what the OS loader is - chain, multiboot, etc. Therefore, if there are no objections to this plan, I can start the implementation (when I finish my exams, of course u_u). I think I will initially place the ISR installation code in grub_chainloader_real_boot in order to have a working version right away, then move it away into its own function and, however the way, "register" it with the boot routines so that it is executed as mentioned above. Other modules/commands would be later modified to add drivemap-related functionality. Is there any site/document (apart from the sources themselves) in which I can learn more about the internals of GRUB2 and, specifically, the "boot" command sequence?. Habbit ---no PGP signature, I'm writing from the uni---