Since "when booted" means that the OS that needs to make changes and write to the disk, is also running from the same disk, has a higher potential for problems/disaster **if** something goes wrong.
Following Murphy's Law, "Anything that can go wrong, will", you are safest to run the operation isolated from the operating system.
My suggestion would be to use the system boot disk (install), or a generic "Live CD".
And for what it is worth, I have partitioned and formatted partitions in the same manner you are describing without ever having an issue, only the flip side I could have been incredibly lucky all those times.