This is exactly the sort of thing I fretted about before my surgery, too!
I have short bleached-blond hair so before surgery I had it cut VERY short and darkened it back to almost its natural color so I didn't have to worry about roots. On Day 5 or 6 in the hospital, some guy came around with a bucket and tubes and plastic sheeting, offering to shampoo hair for $25 - and even though I was semi-conscious from all the drugs I yelled "Over here!" He covered the end of the bed in a bunch of plastic and somehow managed to wash my hair right there on the bed. To this day I have no idea how he did it. But I felt sooooo much better afterwards. I had a private nurse and she used "Pssst" on my hair after that (the dry shampoo). I didn't get a real shower until I was in rehab, about 10 days after surgery. By then it was okay to let my back get wet but I noticed the nurse did keep shampoo away from the staples and steri-strips.
Once I was home I had a hairdresser friend come over to the house and trim my hair every few weeks. I wasn't ready for the salon until I was around 5 months post-op, so I'm really glad I didn't have to worry about roots. I felt like a million bucks when I finally went blond again!!!
A/P fusion on June 19, 2007 at age 52; T10-L5
Pre-op thoracolumbar curve: 70 degrees
Post-op curve: 12 degrees
Dr. Boachie-adjei, HSS, New York