It depends on what version of Windows you are talking about, however having said that it is always illegal to sell a drive with an OS installed that doesnt have a unique licence key.
If you are talking about Windows 95 & 98 then you can install the OS to the drive and in the registry delete the licence key in the registry so on the customers first boot they will need to input the licence key to make it work.
This is what the OEMs used to do when they installed Windows 98, at least I know Tiny Computers did when they sold in the UK. Time Computers did a few models with this too so the customer had to type in their licence on "first" boot.
Its not a mine field I would recommend anybody to venture into these days, as it can get very nasty legally speaking very quickly and with such a small profit to be made its hardly worth it to boot.
And on top of all that then you would have to create a stripped down image to put onto the disks you are selling, which would mean you would need an image per computer or a very stripped down install that would install drivers on first boot.
Also worth noting is that Microsoft dont seem to chase people who give away old abandoned versions of their software for free but as soon as somebody starts making money from it then that changes toot sweet.