PDA

View Full Version : shifting /usr



rumpty
06-03-2005, 08:32 PM
Using Mandrake 10.0. To make some space for Mandrake to breathe, I'm trying to shift the usr directory to another partition.

Found a suitable empty partition with an ext2 file system on it, hda10, made a new directory (usr) on it and copied all the stuff over from my present /usr. Made an entry in fstab to mount hda10, modelled on the entry that mounts the home partition. Renamed the original usr directory usr_old, and created a new directory at /usr.

But it doesn't work. Mandrake will not complete the booting process, although I think hda10 is being mounted, because a message during the next boot test says that hda10 was not properly unmounted!

Any ideas about what I haven't done please? Bit of a newbie at this sort of thing. I'm using SystemRescueCd to access the mess.

Graham L
07-03-2005, 03:29 PM
It's a bit of a difficult one, because some of the things you do rely on using programmes in the /usr tree.. It's a bit like pulling yourself up by your own bootstraps when you have cut off the branch you are standing on. :)

But never fear ... you can do anything with software. This is a common thing to do, and it's actually well documented. The basic trick is to make the changes to the system while not actually running the system. You may be able to use your SystemRescue CD (or, preferably, your Mandrake installation CD in rescue mode).

I'm not going to describe it fully ...other people have done it better. There's a very good article in Linux Gazette which you can get through Google. Enter (with quotes) "moving /usr" linux site:edu to google.co.nz . The fourth link title starts "Linux Gazette ... table of contents" . Go there, and scroll down to the article title "Moving /usr sub-directory to another drive". Click on that and read ... ;)

Just moving /usr linux to Google will get more pages which will probably say the same things in different ways ... but I can't see those from where I am and I can see the LG article because it's on an edu site ;)

rumpty
07-03-2005, 06:16 PM
Thanks Graham. I had been doing some research on the topic using Google, but the closest useful info I had found was about Moving Home, on the IBM Linux site. I'll check further using your suggested links.

Dannz
07-03-2005, 06:30 PM
Look at the mandrake linux site for Command Line Documentation there is something there
Or wait for Chilling_Silence to reply he knows where it is

rumpty
08-03-2005, 08:31 PM
The task has been successfully completed. I had to reformat the partition that was to be used for usr - some superblock problem? After that is was available as expected.

That article you mentioned, Graham, had a simple summary of the procedure for shifting a direcory to another partition, so that gave me confidence that I was more or less doing the right thing. I haven't deleted old_usr yet though!

Thanks for your help everyone.