This is a tutorial from 2016, originally for installing debian jessie
, it may work for newer versions of debian, but I haven't check it (however, it should mostly work because not that much changed since then). You may want to change every occurrence of buster
to a name of a new version of debian.
Make work directory:
mkdir work
cd work