A process for obtaining a valuable product, particularly starch and/or protein, from grain flour, wherein i. the grain flour is mixed with fresh or process water for forming a slurry, ii. the slurry is separated into at least two fractions, particularly centrifugally into a heavy A-starch fraction, into a protein and B-starch fraction (nozzle phase of the decanter) and into a pentosan fraction, iii. biogas is generated from at least one of the fractions obtained during the separation of Step ii., which biogas is used for generating energy, and iv. wherein the fraction used for generating the biogas is subjected to at least one liquefaction step (Step 505) and one phase separation (Step 506), wherein the biogas is generated from the liquid phase of the phase separation. Figure 1