Did you not create the /usr/local partition on /dev/hdc when you installed
Mandrake?  If you did, it should already be mounted correctly.  Check the
output of `mount`.  What, if anything, does it list as mounted on
/usr/local?

If /dev/hdc1 (or whatever partition is to be /usr/local) is not already
mounted on /usr/local, you can sync the two by mounting the hdc partition
temporarily (on, say, /mnt/floppy unless you're already using a floppy
disk), copying the files over, then `rm -rf /usr/local` (this will
permanantly delete anything under /usr/local, so be sure the files are
properly copied or have a backup ready) and finally, umount the hdc
partition and remount it at /usr/local.

`cp -a` will copy while preserving directory structure, symlinks,
permissions and ownership.

Now you're set until you reboot.  You next need to add a line to
/etc/fstab like so:
/dev/hdc1    /usr/local    ext2    defaults  1 2

This tells your computer to mount /dev/hdc1 on /usr/local at next boot.
It also tells your computer things about the filesystem: it's of type
ext2, mount with default options, whether or not to dump(8) the
filesystem, and it's fsck(8) order.

A quick bit of UNIX... uh... trivia: the numbers in parentheses give man
sections for these words (commands, in this case).  You can run `man 8
dumpe2fs` (while the man page for fstab(5) refers to dump(8), the actual 
command on Linux is dumpe2fs(8)) to read about the dump command, and `man
8 fsck` to read about fsck.  The command names are just `dump` and `fsck`,
but the parentheses are used to indicate which specific man page to look
at.  In this case, there's only one for each, so the parenthetical numbers
are extraneous.  You could just as well run `man dumpe2fs`, but the
parenthetical numbers just make things clear.

While you may need to change the partition number when you copy this
line into /etc/fstab, don't change the dump or fsck numbers in the above
example.  Those are the correct values.

-Matt Stegman
<[EMAIL PROTECTED]>

On Tue, 21 Dec 1999, WH Bouterse wrote:

> /dev/hda; The 1-gig has M$/Linux-Mandrake 6.1 with 
> System Commander as boot manager.
> 
> /dev/hdc The second 400mg HD, I made a ext2 mounted as
> /usr/local. 
> 
> /dev/hda3   /   <this one of course has a usr/local too>
> /dev/hdc1   /usr/local
> 
> How does one get Linux to always tell the difference
> between the two /usr/locals? I initially intended
> to have all new programs install in /dev/hdc /usr/local
> in fact I would have preferred to have all original
> programs which get put into /usr/local go into the "extra"
> /usr/local, i.e. the whole install spread out over 
> the two drives. I have "fumbled" with this same issue 
> many times over the last couple years. All the reading and
> misconfigurations have yet to shed real "light" on this,
> for me anyway.
> 
> So is the obvious to cp everything in one /usr/local
> to the other /usr/local maintaining all permissions,
> sym-links etc.? Or a cleaner "do it right the first time"
> kind of routine which I am missing?

Reply via email to