Here's the standard way of deriving the entropy of the ideal gas (see e.g. here): $$ dQ=dU+PdV=C_VdT+\dfrac{NkT}{V}dV $$ $$ dS = \dfrac{dQ}{T} $$ Integration of the latter gives the correct result. Note that nobody ever says here $``\text{consider a particular process, say isochoric}"$. The equation is written for an arbitrary reversible process.
Here's how the analogous thing is done for the photon gas (see e.g. here). $``\text{Consider an isochoric process. Then, } dU=TdS"$, and, so, $$ dS = \dfrac{dU}{T} $$ and so on.
Now, my question about these derivations is very simple.
Why can't we consider an isochoric process in the first case, in order to get $dS=dQ/T=dU/T$? Then, in analogy with the second case, we should throw away the last term in the first equation.
Or do the opposite, and follow the steps of the first derivation in the second case, is order to get $dQ = dU + PdV$? Then, we should add another term in the numerator of the last equation.
What am I missing??