archlinux / archinstall

Arch Linux installer - guided, templates etc.
GNU General Public License v3.0
5.82k stars 509 forks source link

[Suggestion] Disk configuration UUID check. #2488

Open alc1na opened 2 months ago

alc1na commented 2 months ago

I think incorporating UUID-based checks for disk configurations in the JSON profile presets would be highly beneficial. Just yesterday, I nearly lost all data on my secondary SSD due to an unexpected drive reassignment where nvme0n1 and nvme1n1 switched places. By using UUIDs, we can ensure stable device identification regardless of their order in the system, preventing potential mishaps during partitioning or system installations.

P.S. Sorry, cannot add labels.

svartkanin commented 2 months ago

Are you referring to UUIDs merely as identifiers in the Json configuration to make sure you don't accidentally specify the wrong partition?

alc1na commented 2 months ago

Are you referring to UUIDs merely as identifiers in the Json configuration to make sure you don't accidentally specify the wrong partition?

I mean checking directly in archinstall (I don't remember if the config contains the UUID of the SSD itself), whether the device ID matches the one specified (or will be specified, if such implementation isn't currently available) in the JSON configuration file.

Because from my last experience - I didn't want to take the risk and start the installation process hoping that archinstall would alert me that the device ID does not match and thus the new partition table would not be applied to my second SSD filled with lots of important information (including work-related), which is invaluable. It's good that I literally stumbled upon the fact that archinstall was ready to perform a surgical operation on my Samsung 970 Pro instead of the Micron MTF.

This is by no means a complaint - your script is wonderful, and in this case, I am suggesting a fairly important improvement that I can help test. I don't think it will be difficult to implement.

alc1na commented 1 month ago

Here's a more vivid example (booted from a live Ubuntu session). After another OS reinstallation (I experiment a lot with various package sets, DEs, etc., but that's not important right now). My secondary SSD became the primary one. And it will revert to being secondary only during SOME of the OS reinstallations. Maybe during the next one, maybe not. And at one such moment, archinstall wanted to use it for partitioning and installing Arch.