Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mp6Uj-0006ym-Ru for mharc-grub-devel@gnu.org; Mon, 22 Nov 2021 05:24:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mp6Ue-0006yY-Cx for grub-devel@gnu.org; Mon, 22 Nov 2021 05:24:14 -0500 Received: from claudia.s7t.de ([136.243.92.159]:34198 helo=mail.claudia.s7t.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mp6Uc-0004y4-5f for grub-devel@gnu.org; Mon, 22 Nov 2021 05:24:12 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.claudia.s7t.de (Postfix) with ESMTP id A73C341A95 for ; Mon, 22 Nov 2021 11:23:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail01.s7t.de Received: from mail.claudia.s7t.de ([127.0.0.1]) by localhost (mail01.example.local [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Zui1iyQucl62 for ; Mon, 22 Nov 2021 11:23:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail01.s7t.de Received: from [10.100.48.237] (cspsrv00-ext.mpi-sp.org [141.5.46.36]) (Authenticated sender: mail@e7p.de) by mail.claudia.s7t.de (Postfix) with ESMTPSA id 22B0241A59 for ; Mon, 22 Nov 2021 11:23:46 +0100 (CET) Subject: Re: Grub dd? To: grub-devel@gnu.org References: <82323121-3c8a-07ca-6918-ff6a65ea09b5@gmail.com> From: Endres Message-ID: Date: Mon, 22 Nov 2021 11:23:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <82323121-3c8a-07ca-6918-ff6a65ea09b5@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=136.243.92.159; envelope-from=lists@e7p.de; helo=mail.claudia.s7t.de X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.097, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2021 10:24:14 -0000 Hi, could mean a possible security vulnerability. In case there are no other boot devices available, as well as no custom kernel options allowed in the boot line, dd still would offer to dump data from devices. So, I am not sure if that is something that grub should be able to do. At least I would recommend to add it as a "default-off" feature. Cheers, Endres On 11/21/21 4:26 AM, Peter Xu wrote: > Hi, Grub list, >=20 > I found there's no "dd" command for grub.=C2=A0 Is there a reason? >=20 > Asked because I think it could be really handy to be able to do that > with grub.=C2=A0 For example, a simple use case is we can backup root > partition somewhere on a backup disk before hand, then if the real root > partition corrupted for some reason we can always dd it back within gru= b > loader.=C2=A0 It could be helpful when it's non-trivial to attach a USB= live > image to the system so we can't initiate "dd" in a live Linux distro. >=20 > I'm actually thinking of some way to allow the root fs to be recovered > from a "snapshot" by dd-ing from a backup block device before loading > linux and everything, for every single time the system boots.=C2=A0 The= n we > guarantee every time we boot into the system we'll always see the same > content for root fs.=C2=A0 Not sure whether that can be easily done wit= h > current grub. >=20 > Thanks, >=20