From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HygIo-0003eX-Sg for mharc-grub-devel@gnu.org; Wed, 13 Jun 2007 23:47:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HygIn-0003eS-FL for grub-devel@gnu.org; Wed, 13 Jun 2007 23:47:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HygIl-0003eG-2v for grub-devel@gnu.org; Wed, 13 Jun 2007 23:47:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HygIk-0003eD-T6 for grub-devel@gnu.org; Wed, 13 Jun 2007 23:47:14 -0400 Received: from m15-112.126.com ([220.181.15.112]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HygIj-0002X8-Fw for grub-devel@gnu.org; Wed, 13 Jun 2007 23:47:14 -0400 Received: from localhost (unknown [124.248.93.9]) by smtp2 (Coremail) with SMTP id wKjJDLD7wAFEunBGOx2oBA==.1759S2; Thu, 14 Jun 2007 11:47:16 +0800 (CST) Date: Thu, 14 Jun 2007 11:46:49 +0800 From: Bean To: The development of GRUB 2 Message-ID: <20070614034649.GA591@ws3.vdp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-Coremail-Antispam: 1U3Yxn0WfASr-VFAUDIcSsGvfJTg7C26xCjj4IEI4klw4CSww Aac4AC62xK8xCEY4vEwIxC4wC2zVAF1VAY17CE14v26r1j6r15Mx02cVAKzwASzI0EjI02 j7AqF2xKxwAv7VC0I7IYx2IY67AKxVWUJVWUGwCF72vE52k0Y41lYx0Ex4A2jsIE14v26r 1j6r4UM7C26IkvcIIF6IxKo4kEV4ylc2IjII80xcxEwVAKI48JM7AC8VAFwI0_Jr0_Gr1l b4IE77IF4wAFIxvE14AKwVWUJVWUGwAqx4xG64xvF2IEw4CE5I8CrVC2j2Wlb7Iv0xC_Cr UanT9S1TB71UUUUUUa7-sFnT9fnUUI43ZEXa7IUeUCztUUUUUFnT9fnV15pF4UXFW7ur43 AFy3ZF1UAr1kZoXrpr48CFb_u3WxWrs7Ja1UJFWaga1rKFWfXFy2g34qkr97KF4jgr4Svr WfJwn29FZ2kFnI9w18Xrs8CF1Y9Fn5ZryUt3srC X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Command extension suggestions 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: Thu, 14 Jun 2007 03:47:17 -0000 These ideas are mostly from grub4dos, I think they can be useful in GRUB2. 1. cat In addition to the current function, cat can also generate hexadecimal dump, and it can optionally choose the range of bytes to display. For example: cat [--hex] [--skip=S] [--length=L] FILE Sometimes it's useful to dump the content of physical memory, it can be implemented with a special option --mem. For example, cat [--mem] [--skip=S] [--length=L] base_address It can also be implemented with virtual device (md). For example, cat --hex (md)+2 dump the first 1K of memory. But It seems a waste to add a new device just for cat. The cat module can export function dump: dump(unsigned long base, char* buf, int len); other module can use it to generate hexadecimal dump. 2. find Find command is missing in GRUB2. It's used to find the device which contains a certain file. find [--set=var_name] FILENAME If the device is found, it's name will be copied to var_name. For example, find --set=root /io.sys chainloader +1 Boot from the partition that has io.sys in the root directory. 3. chainloader It can be useful if chainloader can load multiple sector file. chainloader [--force] [--load-addr=SEG:OFS] [--boot-addr=CS:IP] FILE The default load address and boot address is 0:0x7C00. With this extension, chainloader can load grldr, ntldr, io.sys, kernel.sys, etc. -- Bean