Stopping storage gadget on boot

I’m running the A6A image[1] on the BeagleBone. Every time it boots up via the USB connection it starts a storage gadget that mounts the FAT partition of the SD on the host computer. I’d like to prevent this from happening. I found here [2] that you could tell systemd to not run the service at boot by

**systemctl disable storage-gadget-init.service**

However, this doesn’t work. It still runs at boot time. However,

rm /lib/systemd/system/basic.target.wants/storage-gadget-init.service

does work. Is this the proper way to keep a service from running at boot?

–Mark

[1] http://circuitco.com/support/index.php?title=BeagleBone#Revision_A6A_Image
[2] https://www.linux.com/learn/tutorials/539856-more-systemd-fun-the-blame-game-and-stopping-services-with-prejudice/

I saw the same thing. I don’t know why the disable doesn’t work but I ended up doing the rm like you did.

I also wanted to remove the cloud9 and bone101 services and found that systemctl disable did work for those.