Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mofcd-0006Vm-3z for mharc-grub-devel@gnu.org; Sun, 21 Nov 2021 00:42:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1modUv-0003Q8-JA for grub-devel@gnu.org; Sat, 20 Nov 2021 22:26:33 -0500 Received: from [2607:f8b0:4864:20::42d] (port=33526 helo=mail-pf1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1modUt-00016x-Ig for grub-devel@gnu.org; Sat, 20 Nov 2021 22:26:33 -0500 Received: by mail-pf1-x42d.google.com with SMTP id x5so12856804pfr.0 for ; Sat, 20 Nov 2021 19:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:from :subject:content-transfer-encoding; bh=SLgg6tqzCCVTgrvx+RmCp1uddhWfE83EACHtaRq/pMI=; b=QvEaMnpp69qb/6Z761Cc5Zv9r30InvnBlows/LKBz3C6yTbFTt7Q3OOBZl+DtSewDh 6b/tF1WNqM+xtLhRKoqu03Wy19dL96n0ifgQKkorTEhMTbtJjKv/+imhtLqMBQWFOHGp BikdQvwkbd5p3OVh3oGtm9i4d8UNhZq54MnHaUaPH8x/B3Sb1xF3Hxyn20lCc+5oEkqJ av8h7XUcbAkolQWsPlIh+dv1p7DBW7FhLxhzCdQH3u8v2p3oIFzW+O9Z29+EjcP5ps93 +uyjjylF9cFv21ejFRl2twEsELoYL1PpPt8ymBCDANGhshW9SeOqXrxM6/0cqDgu20Th KHxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=SLgg6tqzCCVTgrvx+RmCp1uddhWfE83EACHtaRq/pMI=; b=zzK54LFAdd0cC6S6S6W+jkwJDcy0FtvMfgMY7UdVfhKqAiqn4Bx+dlImEfWUFj+olI hZmZf7RIGvtAH4pWSLOfU0iu7Md8G0nsIImG6+sToNl/yBoneqn7IMM3aaWwY9BvDVI1 QL0xIpBSN2bDI7IeMj8jXO38qO1g/g0KwYEjGiGU0xOMP/9qjOIis/41dezaZUd1HtpB DsHpWkEcUyY9EsOZqSVQV28YMUTh9TTtEHYZ1Iif/qpDoCFJ3fhJeUvWcLVkTmuTCdvB gNr6kJwGjpLBud8C0QFQVVXC3FvAxb4toLRFMP8HHFu+VysoLbqyDAJYrfniv5kGaX8R J2mw== X-Gm-Message-State: AOAM533ZzasHlnm+ZaCQAhEx40+SGmWTrjGKQ+vHIZmN5sbrnOsGXc8P dt4Ky+cZeyR/wSZqeAewYsZUGHHkvzE= X-Google-Smtp-Source: ABdhPJxEkk02odlSl++0FRmiHAAGrAdvz8htuYLRSCbkmrm7OE9onhx6/+GBC0EEas4Zt96Tn16Jvg== X-Received: by 2002:a63:4d3:: with SMTP id 202mr26184993pge.36.1637465189010; Sat, 20 Nov 2021 19:26:29 -0800 (PST) Received: from [10.140.0.6] ([191.101.132.237]) by smtp.gmail.com with ESMTPSA id 199sm634109pgb.22.2021.11.20.19.26.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Nov 2021 19:26:28 -0800 (PST) Message-ID: <82323121-3c8a-07ca-6918-ff6a65ea09b5@gmail.com> Date: Sun, 21 Nov 2021 11:26:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-US To: grub-devel@gnu.org From: Peter Xu Subject: Grub dd? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42d (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=xzpeter@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 21 Nov 2021 00:42:37 -0500 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: Sun, 21 Nov 2021 03:26:33 -0000 Hi, Grub list, I found there's no "dd" command for grub. Is there a reason? Asked because I think it could be really handy to be able to do that with grub. 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 grub loader. 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. 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. Then we guarantee every time we boot into the system we'll always see the same content for root fs. Not sure whether that can be easily done with current grub. Thanks, -- Peter Xu