So, I have a computer with two hard drives. One of them has windows installed, and on the other one I installed Ubuntu and set is as my primary. Now I'm trying to format the one with windows so that I can use it as a secondary saving space, but when I try to format it I get an error. I also tried using gparted, but again I couldn't do it. Anyone out there know what's going on?
If the windows version you are running is Windows 10, the problem is most likely due to Windows 10's fastboot feature. To increase boot speeds, windows does not unmount any hard drives it uses when you shut it down. Because the windows drive is still mounted by windows, it will not allow any other operating system to write to it (you could still read data on the drive, but not modify it). To get around this, you need to boot back into windows and force it to do a "full" shutdown by shift-clicking the power icon on the start menu. Follow this guide for more specific instructions:
Once that is done, you should be able to format the drive through Ubuntu (or any other operating system you choose) without issue.