SystemCrafters / guix-installer

A GNU Guix installer image with the full Linux kernel!
GNU General Public License v3.0
243 stars 29 forks source link

Installer's disk partitioner has no confirmation whatsoever before blowing up disk's partition table! #16

Closed lukolszewski closed 2 years ago

lukolszewski commented 2 years ago

That's quite unfortunate, I've run the installer until I got to the partition the disc part. Every other Linux installer in existence when one chooses manual partitioning asks for confirmation before committing whatever changes to disc.

This installer, not only does not ask for confirmation, it presents a misleading statement to select a disc and press enter on it to edit partition table. However, when one selects a disc and presses enter the installer immediately deletes the partition table! This is absolutely insane behaviour. I suggest a notice of this behaviour is written in large letters at the very top of the readme.

Edit: Anyone affected by this don't panic. Don't write anything to the disc. Get a Linux LiveCD (for example Ubuntu 20.04). Then use testdisk tool to recover your partition table if you don't remember your partition sizes. If you do, simply recreate them with fdisk.

I'm creating this issue here, rather than with guix, because I'm not sure if it is the same using the official ISO image.

daviwil commented 2 years ago

Hi Lukasz, I hope you didn't lose anything with this issue! This is indeed behavior of the official Guix Installer. The only thing my repo adds is the full Linux kernel and a reusable channel configuration. You should definitely report what you experienced to the guix-devel@gnu.org mailing list.

lukolszewski commented 2 years ago

Hi, no I didn't loose anything. I managed to recreate my partition table. First let me say thank you for your work to create and share this noguix install media.

About the issue itself. I see you closed the issue and you mentioned it is default behavior in the upstream installer. However in the meantime I created a VM with an ubuntu install and I run the current guix installer from their iso. It doesn't behave like this in its current version. When enter is pressed on a disk it still intends on destroying the partition table rather than editing, but at least it asks for confirmation before it does so. Well, not so much a confirmation, but it asks if you want your new blank partition table to be GPT or MBR.

Perhaps your image uses an older version of the installer that didn't ask this extra question, or through some quirk this didn't show up on my machine, but the fact remains it is quite dangerous to run it on anything that contains real data (all the usual stuff about backing up all your data notwithstanding). It is of course your choice, but my suggestion is to add some sort of warning to the readme.