[FREELDR] Implement proper partition type detection and handling (#1762)