Question: How to mount home,var, user to other dri


Forum: HD Install
Topic: Question: How to mount home,var, user to other dri
started by: exkalibur

Posted by exkalibur on Mar. 22 2006,07:09
'Good day ! First of all, DSL is brand new to me...hence the question.
I've done a hardrive install on an old MMX 200 with 128 Meg of ram, with 3 small 4 Gigs drive. I would like to move some of the directories to those drive but I'm unsure of the proper way of doing it. From what I've read from this forum, I should copy those directories to the drive and then edit the opt.file.
Could someone be kind enough to point me to the procedure ? I may need a step by step. New at this type of distro....
Regards

Posted by mikshaw on Mar. 22 2006,15:02
The easiest way to do this is to do a traditional harddrive install. If you want to use a persistent /usr directory you will be losing much of the benefit of a frugal install anyway.

But if you have frugal and still want to do it, post the setup you want (which directories on which partitions) and I'll see if I can tell you exactly what to put in bootlocal.

If you already have a traditional harddrive install, you should be able to accomplish it easily by editing /etc/fstab and using the "nofstab" boot option.

Posted by exkalibur on Mar. 22 2006,16:43
Thanks Mikshaw.
I do have a traditional install. I want to move the home dir. to hdb1. The usr dir. to hdd2 and var to hdd3. Other option is to leave all on hda1 and use LVM when in need of space. What do you recommand ?

Posted by mikshaw on Mar. 22 2006,20:03
I'd recommend doing one directory first, and then if you have no troubles with it, go ahead and use the same process to do the others.

Let's say we use /home as an example, since it will not kill your system if something goes wrong. For this example, I'll assume /home is being moved to hda2.

Log into DSL as root, preferably without the graphical system running.
Mount the target partition:
Code Sample
mount /dev/hda2

Move the contents of /home onto the target partition. If you prefer to cp instead of mv, make sure the file ownerships and permissions are left intact. It's probably safer to copy, since you can fall back to the original if something goes wrong.  If it succeeds, you can then remove the original files (IMPORTANT: /home MUST BE UMOUNTED before deleting these files, or you will end up removing the contents of your new home!).
Code Sample
mv /home/* /mnt/hda2/
or
Code Sample
cp -pr /home/* /mnt/hda2/

Edit /etc/fstab, adding a line for /home...something like this:
Code Sample
/dev/hda2    /home    <filesystem_type>    <options>    0 0

Edit your bootloader, adding "nofstab" to it's kernel optons.  I'm not 100% sure this is what I think it is, sorry to say....my assumption is that it prevents fstab from being automatically created when you boot.

If anyone sees something wrong with this, or knows a more stable way to do it, please post here.  Thanks.

EDIT:  The instructions above will work only if hda2 is used only for home.  You can put other dirs on the same partition, but it will require a couple extra steps, and I'm not confident about posting any more about this at the moment...in fact, i'm beginning to wonder if i gave you accurate information so far.  Please bear with me while i think it trough a bit more.

Posted by exkalibur on Mar. 22 2006,21:48
Thanks. I'll give that a try. BTW, it doesn't matter if it hoses the system at this point. I can always re install.....
Posted by exkalibur on Mar. 23 2006,05:27
Nahh ! Didn't work. I must have missed something....Anyway, back to square one. Got a bunch of documentation to read and I'll do a frugal install instead in the meantime. I'll try again when I get more time and knowledge......
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.