pop-os / installer

Installer for Pop!_OS & other Linux-based OSes
https://system76.com/pop
GNU General Public License v3.0
26 stars 15 forks source link

Selecting USB storage device for installation wipes SSD instead #277

Open murtezayesil opened 1 year ago

murtezayesil commented 1 year ago

Distribution (run cat /etc/os-release): Pop!_OS 22.04.LTS

Related Application and/or Package Version (run apt policy $PACKAGE NAME): io.elementary.installer

Issue/Bug Description: Selecting a 32GB USB drive as installation target is ignored and internal SSD is targeted and reformatted instead.

Steps to reproduce (if you know):

  1. Plug a USB storage device
  2. Boot into recovery mode
  3. When installer asks for on which storage device should operating system be installed, select the USB device.
  4. Watch as your internal SSD gets formatted and your files gets wiped clean, while the USB device which clearly was selected for installation is not touched in any way.

Expected behavior: Install Pop!_OS on the USB drive such that it would have a partition layout similar to: 0.5GB ESP 4GB Recovery Partition 23.5GB LUKS 4GB cryptswap

Other Notes:

n3m0-22 commented 1 year ago

Tested on lemp11

I have not been able to recreate this issue. I have successfully been able to install Pop!_OS to a few USB drives. In my testing I noticed some drives would show up grayed out and so could not be selected for install. The drives I was able to install on were 64 GB and 128 GB. If I can find a 32 GB drive I will test on that as well. In the meantime to further test this can you answer the following.

murtezayesil commented 1 year ago

Do you have a drive in one or both internal slots?

only on first slot I believe (as assembled with only first storage option by System76)

Are you manually partitioning the USB drive or doing a clean install?

clean install

Is the USB drive to which you are trying to install formatted with a GPT partition table?

I left all partitioning work to installer. I simply selected the 32 GB drive when the storage options were listed. I thought it would do that since "clean install" was selected in previous step

Did you try to install to a USB drive with no internal drives attached?

No, it is as it was from the assembly. I knew removing the internal storage would be the safest option.


Aim of this little experiment was to find out if Pop!_OS installer would isolate its reach to only selected storage devices during install. If it was successful, I was going to recommend Pop!_OS to a friend who was going to attempt the same on his work computer where removing internal components is not be an option.

eva-val commented 1 year ago

Just got hit with this except installing on an SSD in slot 2 (booted from recovery on slot 1) Lemp10

Ran pop-upgrade recovery upgrade from-release` On main pop install before rebooting into recovery

Boot to recovery on SSD 1 Run installer -> clean install -> clean install -> select SSD 2 -> enter user and password -> enable encryption with same password as user Nukes SSD 1 and doesn't touch SSD 2 (that I selected in the installer)

Info about SSD 1 Samsung 970 evo. Default pop install that came with the laptop (lemp10) Info about SSD 2 Brand new Samsung 980 pro with gpt partition table and no partitions

Luckily I back up my home dir but now I'm really regretting not keeping image backups as well

Edit: Yanked the SSDs out and swapped them (1 in 2 and 2 in 1) Disks are now shown in opposite order in the installer... Still overwrites the drive it booted from.

Was worth a shot

murtezayesil commented 1 year ago

Interesting. If I had 2 NVMe drives laying around, I would try if the installation targets slot 1, slot 2 or USB device when installation is booted from USB device.

In fear of wrong device targeting, I developed habit of removing every other storage device physically before doing an OS installation onto bare metal.