A protective bilayer on a magnetic read / write head or magnetic disk is formed as an adhesion enhancing and corrosion resistant underlayer and a protective diamond-like carbon (DLC) overlayer. The underlayer is a transition metal oxynitride, having the general formula MeOxNy, where Me represents a single element or an alloy of the following transition metal elements: Ti, Zr, Hf, V, Nb, Ta, Cr, Mo, and W, here x can be within the range between 0 and 3 and y is in the range between approximately 0 and 2. Adjusting the values of x and y contributes to such qualities of the protective bilayer as stress compensation, chemical and mechanical stability and low electrical conductivity. Methods of forming the adhesion layer, include reactive ion sputtering, plasma assisted chemical vapor deposition, pulsed laser deposition and plasma immersion ion implantation.