From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Jc7LA-0001fC-Se for mharc-grub-devel@gnu.org; Wed, 19 Mar 2008 19:05:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jc7L9-0001db-1B for grub-devel@gnu.org; Wed, 19 Mar 2008 19:04:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jc7L8-0001cy-DT for grub-devel@gnu.org; Wed, 19 Mar 2008 19:04:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jc7L8-0001cu-Av for grub-devel@gnu.org; Wed, 19 Mar 2008 19:04:58 -0400 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1Jc7L7-0004gy-PZ for grub-devel@gnu.org; Wed, 19 Mar 2008 19:04:58 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 19 Mar 2008 19:04:56 -0400 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 51450619058 for ; Wed, 19 Mar 2008 19:04:56 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <200803192358.54130.bhyoram@zahav.net.il> References: <200803162241.25560.bhyoram@zahav.net.il> <200803182131.29217.bhyoram@zahav.net.il> <1205872633.29205.6.camel@dv> <200803192358.54130.bhyoram@zahav.net.il> Content-Type: text/plain Date: Wed, 19 Mar 2008 19:04:55 -0400 Message-Id: <1205967895.7538.31.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: whereis grub shell ? 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, 19 Mar 2008 23:04:59 -0000 On Wed, 2008-03-19 at 23:58 +0200, yoram bar haim wrote: > On Tuesday 18 March 2008 22:37:13 Pavel Roskin wrote: > > There is no "savedefault". It hasn't been implemented yet. And if it's > > implemented, I would actually prefer that grub-emu is only allowed to do > > it by the means of hostfs, not directly. > > I respcetfully disagree. I think that if possible, host filesystems should > only be accessed as "readonly" by a bootloader. We are talking about different things. grub-emu is not a bootloader, it's a userspace program. Anyway, the functionality for writing to files from the bootloader was present in GRUB 1, and I think it can be ported to GRUB 2. Perhaps it would be nice to have extra sanity checks for the filesystems that checksum, compress or mirror the data. But generally, it's a widely used feature, and I'm not aware of many users having their filesystems trashed by GRUB 1. > that also saves the efforts > of implementing safe writing capabilities to all filesystems that grub can > possibly read configuration from. Please note that it's not a general writing capability. It's a capability of writing to a certain short file without changing its length or any metadata (timestamps etc). If necessary, the file can be created by a userspace utility that would try to ensure that the file is contiguous and uncompressed. The file could also include its sector number at the time of creation, so that the bootloader would not write to the file if it was relocated. > I understand that any alternative (probably exploiting reserved byte at the > MBR or bootsector) is durty hack, so if there is an agreed way to > implement "savedefault" but no time to do that, I will be happy to help by > implementing it in any way that is agreed by the good people here. It should be possible to write to the GRUB bootloader in the MBR or in the reserved part of the filesystem, but it's actually less portable. The low-level details of GRUB installation may be different on different systems. Besides, there is less space there. It would be nice to have a whole sector (512 bytes) available. I think nobody would object that we need savedefault functionality that is safe and reasonably portable. As for the details, perhaps whoever supplies the patch should have a choice. I don't think anyone expects savedefault to work under any conditions, such as RAID, LVM and particularly nasty filesystems. But ext2 and fat should work. -- Regards, Pavel Roskin