echo "Yes" | sudo parted ---pretend-input-tty /dev/vdb resizepart 1 1000 fails because of another bug I had noticed recently but not gotten around to fixing yet... when looking for an answer to the exception question, like regular input, parted first looks for the next word given on the command line before trying to read from stdin. It should skip the command line and go straight to stdin for exceptions. You can work around this by not mixing stdin with command line arguments, and just echo everything. In other words:
cat <<EOF | sudo parted ---pretend-input-tty /dev/vdb resizepart 1 1000 yes EOF You can also use whatever units you like; you just need to either change the default unit with the unit command, or append the unit suffix to the numbers, such as 2048s for sector 2048. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1270203 Title: no way to use resizepart non-interactively on busy partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1270203/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs