GNU bug report logs - #57232
[installer] ENTER in guided partitioner destroys partition table

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Tobias Geerinckx-Rice <me@HIDDEN>; dated Mon, 15 Aug 2022 23:13:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added indication that bug 57232 blocks53214 Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 57232 <at> debbugs.gnu.org:


Received: (at 57232) by debbugs.gnu.org; 17 Aug 2022 00:43:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 16 20:43:16 2022
Received: from localhost ([127.0.0.1]:48812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oO79Q-0006ul-18
	for submit <at> debbugs.gnu.org; Tue, 16 Aug 2022 20:43:16 -0400
Received: from tobias.gr ([80.241.217.52]:49902)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1oO79N-0006uc-Lo
 for 57232 <at> debbugs.gnu.org; Tue, 16 Aug 2022 20:43:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=mW/Lt88gvcBhy
 BtOp5USn6MDO52L9soZBekDQYR1h5w=;
 h=in-reply-to:date:subject:cc:to:
 from:references; d=tobias.gr; b=b4USHWjSGPzn+4ATxsy0RkGASzKpWNv8zMzD7K
 YgEhtUNht/lF98f7M4HNtK85tUrdUHsJ1WUj6iYKlsbAQKB7I3H8QB2IkMByojhTOEIBgn
 2cgrvKFndsXkhMdk8Ri7YAPRABnUVS3EccVpBs/DK75tw0adhLq29SOm/bn6mlHRc9/Nhq
 5Na5/NWGpNyFS51nRaudmpRIlc5SbIGjinlrJ24EXrFjjGN15RuES3/lXtJijbM1i6NP8q
 sdZMo5XNn6sqZf8jUqQgVp5Sd+Yo+Ql42Ut8E9NnPFccl8KHMgPj7xFsBbcMW+4IxHzjyq
 NqsHvZFgVJDubX/2Pra3u30Q==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id fc7be5cc
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Wed, 17 Aug 2022 00:43:08 +0000 (UTC)
References: <87zgg5f6el.fsf@nckx> <87y1voefkw.fsf@HIDDEN>
 <87ilmsf68j.fsf@nckx> <87ilmroogn.fsf@HIDDEN>
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: Re: bug#57232: [installer] ENTER in guided partitioner destroys
 partition table
Date: Wed, 17 Aug 2022 01:40:42 +0200
In-reply-to: <87ilmroogn.fsf@HIDDEN>
BIMI-Selector: v=BIMI1; s=default;
Message-ID: <87edxfg0pw.fsf@nckx>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57232
Cc: 57232 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Mathieu,

Mathieu Othacehe =E5=86=99=E9=81=93=EF=BC=9A
>> Er, I was=E2=80=A6 expecting that to mean it would pop up a pretty=20
>> window or
>> something.  Is this really a feature?  Should it be?
>
> I'm not sure what's the point here.

I'm not sure whose point you're referring to, so I'll clarify=20
mine.

Currently, pressing ENTER on a whole disc device wipes its=20
partition table, or at  least did so for me (MBR).  That's an=20
unexpected way =E2=80=98to change a disk's partition table=E2=80=99 even if=
 it's=20
technically true.

It wasn't clear to me whether it was intentional, or a bug, or=20
perhaps a bit of both.  Hence my question.  I agree that we should=20
warn before writing anything, but that's somewhat orthogonal.

I had rewritten the dialogue before encountering this issue, but=20
it doesn't seem like I understand the intention behind the design=20
very well.  I'll drop the UI-related patches and leave that effort=20
to someone who does.

> we would be glad to get your support.

That wasn't the impression I got in response to some mild=20
criticism, but thanks.  I'll keep working on it when I get that=20
spare machine :-)

(I do consider the installer important to the project, even if I=20
never claimed to be its target audience.)

Kind regards,

T G-R

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYvw5bw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15neYA/ikW132MHf1kcNvKt2rWLJ1Xn/FfIYSSXsQ0d27p
aSG2AQC5uYWM/rh0ikPskmx4BMl2GkVl8kVqt/nIBicp/3vpAg==
=ipLh
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#57232; Package guix. Full text available.

Message received at 57232 <at> debbugs.gnu.org:


Received: (at 57232) by debbugs.gnu.org; 16 Aug 2022 21:42:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 16 17:42:12 2022
Received: from localhost ([127.0.0.1]:48537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oO4KC-0002Ko-1z
	for submit <at> debbugs.gnu.org; Tue, 16 Aug 2022 17:42:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40896)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1oO4KA-0002KY-9h
 for 57232 <at> debbugs.gnu.org; Tue, 16 Aug 2022 17:42:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40788)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>)
 id 1oO4K4-0001Zc-1Z; Tue, 16 Aug 2022 17:42:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=3mopOz9ylBvxG+a+ybo8pITxp3Fzde8RfLpycVoLI4I=; b=YxtzQCArwp7A/N+LHcai
 HOnWfZUY2JjSlIqD5SEVkxZMPDu6ciaqCLE4ct1XEXvebjAbUt5RQL37HtK5N6YVfkkp1MeyJ4nk3
 N/PtHtJqkQr10KeeORgLmkCSMPwakq2ifeu1ZlXg0qth4TjWGcmQ6tX+9ERW1Bk4Z+B1HC48xkxU+
 ZraVHjaKnlUpF88moeoF/zwP2Ozmu/+6JOXU7m8HQ699Y78UIf2RPpcfz4FCQl1QXmT1HQaQy+NnR
 Reiv4nbVuwphCu91FN0W2mEq/wJVswqLR/dldxLUJnjZG6c7HI4OchLMBxGjSjcuGp5Kpoz50Vwcz
 zq7UWgH650PUfw==;
Received: from 2a02-8429-81d2-3d01-94c9-8097-ea5c-2774.rev.sfr.net
 ([2a02:8429:81d2:3d01:94c9:8097:ea5c:2774]:52528 helo=meije)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>)
 id 1oO4K3-0008Vb-JQ; Tue, 16 Aug 2022 17:42:03 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>
Subject: Re: bug#57232: [installer] ENTER in guided partitioner destroys
 partition table
References: <87zgg5f6el.fsf@nckx> <87y1voefkw.fsf@HIDDEN>
 <87ilmsf68j.fsf@nckx>
Date: Tue, 16 Aug 2022 23:42:00 +0200
In-Reply-To: <87ilmsf68j.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue,
 16 Aug 2022 18:55:05 +0200")
Message-ID: <87ilmroogn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57232
Cc: 57232 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Hey,

>  =E2=80=9CYou can change a disk's partition table by selecting it and   p=
ressing
> ENTER.=E2=80=9D
>
> Er, I was=E2=80=A6 expecting that to mean it would pop up a pretty window=
 or
> something.  Is this really a feature?  Should it be?

I'm not sure what's the point here.

> I have to be honest: I was extremely let down by the installer UX, *becau=
se* I
> read a lot of the code and can see how much effort went into it.  I hate
> pointing out that the partitioner is at once less useful and more dangero=
us
> than (system "fdisk").

Many people have contributed to the installer over the years. Your
remark is both harsh and unconstructive. I don't think that the fact
that you, Tobias, are extremely let down matters much to the project.

Calling "fdisk" or "parted" directly would not provide the
auto-partitioning feature, and would be less convenient when it comes to
encryption and partition mount points selection.

It's no secret that the partitioning code can be improved like many
other Guix areas. If you feel like you can refine it, in term of
stability and general UX, we would be glad to get your support.

Mathieu




Information forwarded to bug-guix@HIDDEN:
bug#57232; Package guix. Full text available.

Message received at 57232 <at> debbugs.gnu.org:


Received: (at 57232) by debbugs.gnu.org; 16 Aug 2022 17:28:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 16 13:28:16 2022
Received: from localhost ([127.0.0.1]:48212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oO0MS-0001s2-Hj
	for submit <at> debbugs.gnu.org; Tue, 16 Aug 2022 13:28:16 -0400
Received: from tobias.gr ([80.241.217.52]:55408)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1oO0MQ-0001rs-72
 for 57232 <at> debbugs.gnu.org; Tue, 16 Aug 2022 13:28:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=/Be7jOdSJ7bla
 tK/qf/eS9vU7IV8pdhQCAipzrB9ndY=;
 h=in-reply-to:date:subject:cc:to:
 from:references; d=tobias.gr; b=YQZRglLGGiOZdYZ47N0YxYtVLaiS3VRYyAxFfi
 Vxh/4lVI+yiTjqaZIEhSn2Q3YcX4gL9PdRXXuS2JlTXZE3IOnriv6X2UkvAvPqbRxxlRZi
 ++Pe7SMn1xl4qBSNcgzuWQMsa+3mGRn/nHCViUrV0RhgJ/oOYM/RWonZ2cbi9brGNutMSq
 3PcpmOFz4MFUnGVXnICc6bjqRTFQtTMuBTUH730U5td7dP4MYN8K+8DTa/Mdx78zvraK7W
 s5C6x1DyNWUk4LdFly7NOUMo+AdkwMsPjnA5xB0XBhPqp0IdegPD3npFCsHPJHLytaYFtg
 o22NybdV+Hliz2hUAzxPoaAw==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 996654dd
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Tue, 16 Aug 2022 17:28:10 +0000 (UTC)
References: <87zgg5f6el.fsf@nckx> <87y1voefkw.fsf@HIDDEN>
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: Re: bug#57232: [installer] ENTER in guided partitioner destroys
 partition table
Date: Tue, 16 Aug 2022 18:55:05 +0200
In-reply-to: <87y1voefkw.fsf@HIDDEN>
BIMI-Selector: v=BIMI1; s=default;
Message-ID: <87ilmsf68j.fsf@nckx>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57232
Cc: 57232 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Mathieu!

Mathieu Othacehe =E5=86=99=E9=81=93=EF=BC=9A
>> What that does is immediately and without confirmation wipe the=20
>> on-disc
>> partition table.  And its back-up.
>
> Oops, glad you were able to recover, I was also bitten in the=20
> past.

My mistake for insisting on a bare metal test without a throwaway=20
machine handy :-)

> The attached patch adds an extra confirmation page before wiping
> everything, WDYT?

Code looks all right.  I'll try it out.  Thanks!

The help text for users reads, in part:

  =E2=80=9CYou can change a disk's partition table by selecting it and=20
  pressing ENTER.=E2=80=9D

Er, I was=E2=80=A6 expecting that to mean it would pop up a pretty window=20
or something.  Is this really a feature?  Should it be?

I have to be honest: I was extremely let down by the installer UX,=20
*because* I read a lot of the code and can see how much effort=20
went into it.  I hate pointing out that the partitioner is at once=20
less useful and more dangerous than (system "fdisk").

:-/,

T G-R

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYvvTrA0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15yNEBALvR/5YUi1ioZJ/8Hh0tqXsjT9AQfzbe4U9cm3nB
stJ3AQCzrPhdcH/eARHGaqD1XdLkDpYZfbMG1c5uwZHINEfUBg==
=yelZ
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#57232; Package guix. Full text available.

Message received at 57232 <at> debbugs.gnu.org:


Received: (at 57232) by debbugs.gnu.org; 16 Aug 2022 08:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 16 04:52:04 2022
Received: from localhost ([127.0.0.1]:44750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oNsIr-0008FO-59
	for submit <at> debbugs.gnu.org; Tue, 16 Aug 2022 04:52:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41958)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1oNsIk-0008F1-Vs
 for 57232 <at> debbugs.gnu.org; Tue, 16 Aug 2022 04:51:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44846)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>)
 id 1oNsIc-0007Er-NQ; Tue, 16 Aug 2022 04:51:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=zIYfwgz9TokpwNrxDNkRKKAhEwGua+ZE0ut8aJPvaPI=; b=Xker4qaBWsfUK40nb5nZ
 GO0RPLTbi/jf9mXrUvb3wFYcju25OY1K8N+4FjAhPx5dDINGR4ogPvZkNm4/Vz8HO+89rTEQhjuLq
 vNv7DOGAhzCYH2LGaa/V/9ae5gAKC4joJg95PMDXg3ag9Wr2vQ4H5R4AW6uKAkrX2I0H5nHIyqmTj
 6eR/WFWEBLWBSM8t2+W8kileBtXN8naWWxJr+eFjZzosDWIVv817dXjO0gwyr86vUmFZh5TIUNpuu
 LnrpXWufRkUuG3+0qI/Jl0eVuBis+dLyZaGUv4pzIBIbl9+PYDTBwtT7NSOrDmUfuxXBniD1bHqkM
 4D+IwkUnawbLsA==;
Received: from 2a02-8429-81d2-3d01-94c9-8097-ea5c-2775.rev.sfr.net
 ([2a02:8429:81d2:3d01:94c9:8097:ea5c:2775]:44026 helo=meije)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <othacehe@HIDDEN>)
 id 1oNsIb-0001WM-Sw; Tue, 16 Aug 2022 04:51:46 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>
Subject: Re: bug#57232: [installer] ENTER in guided partitioner destroys
 partition table
References: <87zgg5f6el.fsf@nckx>
Date: Tue, 16 Aug 2022 10:51:43 +0200
In-Reply-To: <87zgg5f6el.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue,
 16 Aug 2022 01:05:29 +0200")
Message-ID: <87y1voefkw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 57232
Cc: 57232 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain


Hey Tobias,

> What that does is immediately and without confirmation wipe the on-disc
> partition table.  And its back-up.

Oops, glad you were able to recover, I was also bitten in the past. The
attached patch adds an extra confirmation page before wiping everything,
WDYT?

Mathieu

--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0001-installer-partition-Add-a-confirmation-page-before-f.patch
Content-Transfer-Encoding: quoted-printable

From 4a9c1fb1fe7f9a65b2b7d1f9e4419b1d28a8082e Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@HIDDEN>
Date: Tue, 16 Aug 2022 10:49:07 +0200
Subject: [PATCH 1/1] installer: partition: Add a confirmation page before
 formatting.

Fixes: <https://issues.guix.gnu.org/57232>.

* gnu/installer/newt/partition.scm (run-label-confirmation-page): New
procedure.
(run-label-page): Call the above procedure before proceeding.
---
 gnu/installer/newt/partition.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partitio=
n.scm
index e7a97810ac..f11a644f92 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright =C2=A9 2018, 2019 Mathieu Othacehe <m.othacehe@HIDDEN>
+;;; Copyright =C2=A9 2018, 2019, 2022 Mathieu Othacehe <m.othacehe@HIDDEN=
om>
 ;;; Copyright =C2=A9 2019, 2020 Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2020 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;;
@@ -92,6 +92,15 @@ (define (device-items)
          (device (car result)))
     device))
=20
+(define (run-label-confirmation-page callback)
+  (lambda (item)
+    (and (run-confirmation-page
+          (format #f (G_ "This will create a new ~a partition table, \
+all data on disk will be lost, are you sure you want to proceed?") item)
+          (G_ "Format disk?")
+          #:exit-button-procedure callback)
+         item)))
+
 (define (run-label-page button-text button-callback)
   "Run a page asking the user to select a partition table label."
   ;; Force the GPT label if UEFI is supported.
@@ -103,6 +112,8 @@ (define (run-label-page button-text button-callback)
        #:title (G_ "Partition table")
        #:listbox-items '("msdos" "gpt")
        #:listbox-item->text identity
+       #:listbox-callback-procedure
+       (run-label-confirmation-page button-callback)
        #:button-text button-text
        #:button-callback-procedure button-callback)))
=20
--=20
2.37.1


--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#57232; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Aug 2022 23:12:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 15 19:12:31 2022
Received: from localhost ([127.0.0.1]:44308 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oNjG3-0001vo-6q
	for submit <at> debbugs.gnu.org; Mon, 15 Aug 2022 19:12:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:46192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1oNjFy-0001ve-I0
 for submit <at> debbugs.gnu.org; Mon, 15 Aug 2022 19:12:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54204)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1oNjFx-0000nc-GZ
 for bug-guix@HIDDEN; Mon, 15 Aug 2022 19:12:26 -0400
Received: from tobias.gr ([2a02:c205:2020:6054::1]:51990)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1oNjFv-0001Ch-HN
 for bug-guix@HIDDEN; Mon, 15 Aug 2022 19:12:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=HwZy5uas7u0h1
 4VY2J/1cmjmW9emG95wsbAVQcoY55w=; h=date:subject:to:from;
 d=tobias.gr; 
 b=Wz9henqAd1/hdvRreUmJO6q0NeqIePEEW893Q88vStiegx6MdmvmMs8T1+lr9qwVRJCL
 v/eOU9sJumqTMHjtnYd3W0HLJsDb0Aok7FMgMypVY4SPmcIms2CRWSGKPjqLmKoRj28UFE
 4kPPdghONMp6niPxM24slz+zwiU1ktg541s2ZZW09fT0NtzmHBljaUTAFL3IZC8ygBUtQ1
 12xg3JedfMtwmNmPkWK6IxdO2qcIpECjEoiEYysRfDDmOnqzQjXuPBkpP4fH83X2DhXxwS
 dC8i3HdkLrGkyjwWzuPJvR4pHnfAb8AlzogcC1TrAIbxYdHCUjKJZSgG3D3LmDVA==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id a6397225
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <bug-guix@HIDDEN>;
 Mon, 15 Aug 2022 23:12:16 +0000 (UTC)
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Bug reports for GNU Guix <bug-guix@HIDDEN>
Subject: [installer] ENTER in guided partitioner destroys partition table
Date: Tue, 16 Aug 2022 01:05:29 +0200
BIMI-Selector: v=BIMI1; s=default;
Message-ID: <87zgg5f6el.fsf@nckx>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@HIDDEN;
 helo=tobias.gr
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi all,

Whilst testing the graphical installer, I selected =E2=80=98guided=20
partitioning=E2=80=99 and pressed ENTER on the main drive (sda) to see=20
what that does.

What that does is immediately and without confirmation wipe the=20
on-disc partition table.  And its back-up.

Testdisk is great,

T G-R

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYvrS0g0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW155zkBANCuJZOLhCmTze41p3MlDWMAaxz3zI4b4FAuHB9V
VK9VAP9RKtVp4WeCoAnPY9OIy21kTknFSt2zyS9D4v5acf7WDQ==
=q9w4
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Tobias Geerinckx-Rice <me@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#57232; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 5 Sep 2022 13:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.