Shell script init for THP disable
move disable-transparent-hugepages to
/etc/init.d/
make executable and change permission
sudo chmod 755 /etc/init.d/disable-transparent-hugepages
Configure your operating system to run it on boot.
Ubuntu and Debian
sudo update-rc.d disable-transparent-hugepages defaults
sudo insserv /etc/init.d/disable-transparent-hugepages
sudo chkconfig --add disable-transparent-hugepages