Yup sorry in line 61 I had nbdsrv=${nbdsrv%%:*} instead of the correct nbdsrv=${nbdsrv%:*}.
Here's a snippet to verify it should be ok now: nbdroot='[2001:6f8:32f::39]:1234/some/nbd/path' nbdsrv=${nbdroot%%/*} nbdpath="/${nbdroot#*/}" case "$nbdsrv" in *:*) nbdport=${nbdsrv##*:} nbdsrv=${nbdsrv%:*} # Square brackets are used for IPv6 hosts. Strip them. nbdsrv=${nbdsrv#[} nbdsrv=${nbdsrv%]} esac echo "nbdroot=$nbdroot, nbdsrv=$nbdsrv, nbdport=$nbdport, nbdpath=$nbdpath" Attaching the corrected nbd-client.initrd, along with 2 other minor enchancements, to get it under 100 lines. :) ** Attachment added: "nbd-client.initrd" https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/594595/+attachment/2614420/+files/nbd-client.initrd ** Patch removed: "nbd-client.initrd" https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/594595/+attachment/2614401/+files/nbd-client.initrd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/594595 Title: feature request: support colons in nbdroot kernel parameter To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/594595/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs