Are modified boot images for rooting OS specific? I'm trying to figure out how to root Oreo on Nexus 6P

The guides I was able to find are all Marshmallow (6.0) specific, and include requirements for 3 files: (1) Modified boot image, (2) TWRP recovery and (3) SuperSU

Obviously, the latter two are OS independent and I simply get the latest versions.

But can I use the same modified boot image for Oreo 8.0/8.1 as I did for Marshmallow 6.0? Or do I need OS specific modified boot image?
Boot.img has the kernel
 and ramdisk
 in it (linked answers explain what they do). They are the  first components that boot your device and subsequently OS comes into picture

Some reasons not to flash the boot.img meant for one OS on to another OS:


Hardware is usually different and so are the drivers for it. Which means hardware components may fail to function in the absence of drivers. Worst case, your device may be unusable (say your display drivers don't work)
Security Kernels are updated with latest security patches and flashing older kernel would make you vulnerable
Encryption In the instant case you are talking of Marshmallow and Oreo. They have major differences in the way OS boots and in the way encryption is done. Marshmallow has Full Disk Encryption which has been replaced by File encryption from Nougat onwards. See this for details. So your device likely would fail boot


These are few things that are on top of the mind. In short don't