A line drawn (or scratched) in the dirt
If you were going to make something in the kitchen with just the basic components one would say you were starting from scratch. This phrase (in America) can be traced back to the 1850’s when someone would draw or “scratch” a line in the dirt that would signify the starting line of a footrace. If you were starting from this scratched line then you were given no advantage above anyone else – you were, in that case, “starting from scratch”. Over the years the term has evolved to relate to anything started from the beginning with no advantage.