Skip to content

Check block dev for previous pmOS install

Administrator requested to merge fix/708_check_blk_dev_previous_install into master

fixes #708 (closed)

The method of 'install detection' used here is to look for partitions with pmOS_ in the partition label. It's not a guarantee, but it works when FDE is enabled without having to unlock the partition to read files within it.

Here's what you see during installation if you try to install to a sd card with a previous installation of pmOS:

[16:43:59] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [16:43:59] WARNING: This device may have a previous installation of pmOS. CONTINUE? (y/n) [n]: y

Note: in the implementation, we loop through the glob of sdcard partitions in a new loop since we only want to prompt once. The previous loop looking for mounted partitions would result in multiple prompts since we wouldn't want to break out of that loop (we would want to check every partition to see if it is mounted)

Note: this depends on 'blkid', which is on every Linux system I've ever come across, AFAIK, so that shouldn't be an issue.. right?

Merge request reports

Loading