Reaction of cyclobutylmethanol with HX
This is actually a trickier question than first inspection.

Your statement about primary alcohol substitution is more or less correct. Unless you have a very good reason to form the primary cation, you won't.

The problem in this example is that cyclobutylmethyl cation is not a primary cation even though if you were to draw it out, you might naively think that. Cyclobutylmethyl cation belongs to a special class of cations that are considered non-classical in the sense that the positive charge is not heavily localized to one atom, for example like methyl cation or tert-butyl cation. This essentially means that the positive charge is spread out over several atoms, and this increases the relative stability of the cation, making it more likely to form.

The more famous example is a 2-norbonyl cation, which is covered in many introductory classes.

For cyclobutylmethyl, the literature I found (hard to link) seems to suggest that the contribution from cyclopentyl cation is much larger than the cyclobutylmethyl cation, so we might consider this to be more neighboring group participation (from the C-C bond) than a raw non-classical ion. This is likely due to the fact that the ring expanded version is so much better in terms of strain.

Either way, a dissociated cation is stabilized, so I would think that this mechanism is more $S_{\mathrm{N}}1$-like.