Page MenuHomePureOS Tracker

OEM image formats wrong hdd?
Closed, ResolvedPublic


This needs more testing because i don't want to reproduce it. But when I ran the OEM installer, I had two drives, SSD and HDD. The OEM installer picked up the HDD instead of SSD, and it showed me the warning "there's an existing ext4 partition, do you want to proceed", etc.. I didn't want to so I shut down, removed the hdd, and restarted. When pureos was installed and I put back my hdd into the machine, I realized the hdd was repartitioned (not formatted though I think) so I lost the contents of all my hdd.

Event Timeline

zlatan.todoric added a subscriber: zlatan.todoric.
mak added a comment.Jul 26 2017, 15:03

I am not sure if this is actually a bug - as soon as you hit the OEM install button, the OEM script will wipe all disks without asking, to ensure they are in a pristine state and contain a filesystem.
I changed the preferences for where the OS gets installed a while back, so in case we find something where we think that it is an SSD, the disk will be preferred over HDDs on the same machine.

All disks will be erased during OEM install, by design. It should not delete the contents of any USB disks plugged in though. Your disk was "only" repartitioned, not formatted, so you might still be able to rescue something.

The "Install PureOS and delete everything" promt you hit enter on is meant seriously ;-)

Humm, ok,well, it's not intuitive because it asks for confirmation *after* it already repartitioned the disc (and yes, even without reformatting it's bad), but I guess it can be closed since technically, it's OEM and it shouldn't be running on a machine which is not meant to be wiped.. but in that case, just drop the "hdd already has a partition, are you sure you want to delete?" prompt since it's useless.

mak closed this task as Resolved.Jul 26 2017, 16:02

It should actually not show that prompt, but I haven't yet found a sane way to tell mkfs to override existing partitions without also having it ignore potential other issue that we do not want to ignore.

But yeah, getting rid of that warning is possible (and should be done), but I haven't had time to do that yet.
The user having to select "Install PureOS OEM and erase disk" should already be a warning :P (having to reconfirm is pretty annoying if you have to install this on hundreds of devices). I should make this "disks" though, I guess.