Manufacture of magnetic and optical media