Confined linear carbon chains as a route to bulk carbyne