adb su permission denied, no rom, rooted, need to fix internal sd card
Quoting your code:

adb shell
mount /sdcard
su


And now your output:

adb shell
~ $ mount /sdcard
mount /sdcard
mount: permission denied (are you root?)


it becomes quite clear why your su is not recognized: it comes too late. You need to move it one line up, as mount already requires root. Still, that would launch another shell, and wait for your input. Once you exit, the remaining commands would be executed. So correctly put, it should look like this:

adb shell
su
mount /sdcard


or like this:

adb shell su -c 'mount /sdcard'


So this part would work. The next part is something completely different:

su parted /dev/block/mmcblk0
rm 1
rm 2
rm 3
quit


The first line is your command. But the remaining lines are no shell commands, but the input to parted, so this needs to be handled differently:

su parted /dev/block/mmcblk0 &lt;&lt;MyCommandsHere
rm 1
rm 2
rm 3
quit
MyCommandsHere


That's a so-called Here-Doc.