As you can't have /dev/disk/by-label//, we need to escape the '/'
character in the same way that udev does.
echo "Warning: no root specified"
root="/dev/sda1"
elif [ "${root#LABEL=}" != $root ]; then
- root="/dev/disk/by-label/${root#LABEL=}"
+ # FIXME: may need to do more escaping here
+ l=${root#LABEL=}
+ label=${l//\//\\x2f}
+ root="/dev/disk/by-label/${label}"
elif [ "${root#UUID=}" != $root ]; then
root="/dev/disk/by-uuid/${root#UUID=}"
fi