The owner of troubled British DIY chain Homebase has sold the majority of its stores to the CDS group, which manages retail chains, but 2,000 jobs remain at risk.