We had to write a mini operating system back in varsity days that could boot from a floppy / usb drive, we used a book called Operating System Concepts by Silberschatz. Never really went deeper into operating systems since it didn't feel that useful compared to building business software - Linux already existed and it was already a damn good OS which I could just fork if I really wanted to.