How to Format a Hard Disk in an original IBM PC/XT (if all you have is DEBUG)
The Fixed Disk controller in the original IBM PC/XT, as it came from IBM (OEM'ed Xebec 1210) did not contain a user-facing program in its ROM BIOS, to facilitate low level formatting, because IBM intended for users to use the Advanced Diagnostics Disk to perform all initial system diagnostics, with a low level format of the disk being one of the functions performed.
If you do not have this disk, so long as you have a PC-DOS (or MS-DOS) disk with DEBUG.COM on it, you can still write a small program that does the same functions as the low level formatting routine on the Advanced Diagnostics Disk.
This video demonstrates using the aforementioned technique, to low level format a 20 megabyte disk; subsequently partitioning the disk, and formatting it for use (and subsequent boots).