Other Help Topics :: How to set /home to another partition



Hey everyone!

I searched the forum for this but couldn't find anything, maybe it's called something different, sorry if the is a topic on this on already.

I installed the latest DSL, 4.4.3 on my Toshiba Satellite Pro 4200 500MHz, 128MB RAM, 20GB HDD using HD-install.

I would like to have the /home folder on a different partition (mounted to a different partition, don't know the exact terminology. ) so when I upgrade or change distros my data doesn't get lost.

Yes, I know there is a backup service but I usually keep alot of things in my home folder and it takes a long time for the initial backup. ( I had some problems with this, I loaded the home folder with pics and then I thought DSL froze when I tried to turn off the laptop, when in fact it was backing up the data).

So, can this be done and how?

Thank you.

What you're looking for is called persistent home - you can find the explanation of what to do in the dsl wiki.

If your files are reasonably static, why not save them on the other partition rather than in /home/dsl?

That's it! Thanks!

That would be an option too, but I'm too lazy to always copy stuff to the other partition. This way, I just copy stuff to  $HOME and it's easier. It's more convenient for me this way :)

I agree with you.  Static files are best stored, in my opinion, in a persistent home, as long as you don't have a need to use multiple machines.  Personally I even keep other files such as root's personal configs, bootlocal, and other files I want to persist in a subdirectory of /home/dsl (with proper file ownership) and copy or link them into the system because I find it more logical to do that than to rewrite a backup file every time I reboot.
Well I followed all the instructions, but I am not sure I managed to do what I wanted.

hda4 is the partition I want home to be. I created a folder named home there. Modified fstab and bootlocal.sh, added the home=hda4 and nofstab to the appen line in lilo.conf.

hda4 is mounted at boot, and I see it unmounting at shutdown but if I put a file in my home directory it doesn't show up in /mnt/hda4/home/dsl. What did I do wrong?

Here's my /etc/fstab:

Code Sample
/dev/hda2  /  ext2  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
/dev/cdrom  /mnt/auto/cdrom  iso9660  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext2 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda3 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda4 /mnt/hda4 ext2 noauto,users,exec 0 0


And my /opt/bootlocal.sh:

Code Sample
#!/bin/bash
# put other system startup command here
/sbin/syslogd
mount /dev/hda4 /mnt/hda4

Next Page...
original here.