From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NPSe0-0008JY-SI for mharc-grub-devel@gnu.org; Mon, 28 Dec 2009 22:21:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPSdz-0008Is-Vb for grub-devel@gnu.org; Mon, 28 Dec 2009 22:21:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPSdv-0008FC-4R for grub-devel@gnu.org; Mon, 28 Dec 2009 22:21:11 -0500 Received: from [199.232.76.173] (port=59241 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPSdv-0008F3-1a for grub-devel@gnu.org; Mon, 28 Dec 2009 22:21:07 -0500 Received: from mga09.intel.com ([134.134.136.24]:7026) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NPSdu-0002Q9-T0 for grub-devel@gnu.org; Mon, 28 Dec 2009 22:21:07 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 28 Dec 2009 19:21:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,466,1257148800"; d="scan'208";a="582713520" Received: from debian.sh.intel.com (HELO [10.239.13.65]) ([10.239.13.65]) by orsmga001.jf.intel.com with ESMTP; 28 Dec 2009 19:20:40 -0800 From: Zhu Yi To: The development of GNU GRUB In-Reply-To: <4B392B6E.2060807@isaac.cedarswampstudios.org> References: <1260523561-19086-1-git-send-email-yi.zhu@intel.com> <20091224212119.GI12122@thorin> <1261983314.6037.84.camel@debian> <4B392B6E.2060807@isaac.cedarswampstudios.org> Content-Type: text/plain; charset="UTF-8" Date: Tue, 29 Dec 2009 11:21:03 +0800 Message-ID: <1262056863.6037.106.camel@debian> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: ml@isaac.cedarswampstudios.org, rmh@aybabtu.com Subject: Re: [PATCH] Backup old boot sectors before installation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 03:21:12 -0000 On Tue, 2009-12-29 at 06:04 +0800, Isaac Dupree wrote: > > Option 1~3 requires the recover has the knowledge of the backup file > > format somehow, but a simple dd is enough for option 4. What do you > > think? > > If the partitioning had been changed in the mean time, 4 would overwrite > it with the older values. Similar problem for a weird setup with > partitions in between (I dunno, might be possible with GPT or other > weirdness). Good point. > I think option 2 or 3 is soundest. Option 2 would have three separate > files of information, (right?), and there must be a pretty > straightforwards `dd` option to skip to the correct start position. > Option 3 would omit the "start position" file... but that file is really > cheap, maybe we'd better keep things simple for restorers and stick with > three separate files.(Or, we could do something weird like putting > start-position somewhere in the filename of the backup.) This requires the restorer to understand the role of each of the 3 (or 2) files and use `dd' twice with correct options. So an important thing is, we need to document this somewhere. And I think the best place is to "document" it in the grub-install script. Because this will enable the not-so-advanced user to recover her boot sectors easily as well. If we decide so, we go back to option 1 (my original implementation). Because the backup file format is not important any more as it is totally transparent to the restorers. Am I right? Thanks, -yi