/home in a different partition
i heard that is possible to mount my /home directory in a different partition than the root partition, how do i make that?
i made several attempts, like in fstab the mount point of /dev/hda5 in /home, but the only thing that i got there was the paste lost+found. i would liko to know how the /etc/fstab should be. thanks! |
wouldnt you just create a logical or primary partition then mount it on /home? so use cfdisk to add a new partition, then mount it with
mount /dev/hda? /home , replacing ? with whatever number the partition is. to make a permanent change you would have to edit /etc/fstab, and create a new entry for your new partition (e.g. /dev/hda3 - altho u might prefer to have a logical one) followed by its mounting point in line with the table (/home) then its filesystem and so forth until it looks like the other fstab entries. if you dont know the answer for one of the columns, just copy the settings of your /dev/hda2 partition. let me know how u do :) |
Code:
/dev/hdd6 swap swap defaults 0 0 |
/dev/hda5 / reiserfs notail 0 0
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/hda2 /boot ext3 noauto 1 1 none /dev/pts devpts mode=0620 0 0 /dev/hda6 /home reiserfs notail 0 0 /dev/hdb /mnt/cdrom auto unhide,umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0 /dev/hdc /mnt/cdrom2 auto unhide,umask=0,user,codepage=850,iocharset=iso8859-15,noauto,ro,exec 0 0 none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0 /dev/hda1 /mnt/windows ntfs umask=0,nls=iso8859-15,ro 0 0 none /proc proc defaults 0 0 /dev/hda3 swap swap sw 0 0 That's what my fstab looks like. 1 hard drive with windows, /boot, /swap, /root (hda5) and /home(hda6). The benefit of having a seperate /home (either on the same hdd or a different one) is that if you want to re-install either the same or a different distro, then none of your personal data in /home is lost and provided that you've installed all the same packages (for instance, with me I use opera for browsing, but I alway's have to install that seperatly - after a reinstall of whatever distro, the opera icon in the home partition doesn't work until i've reinstalled the opera as well), then everything works OK. I did the partitioning under windows with Partition Magic 8 - though there's various ways of doing that within linux. regards John |
Ok, i added the line in fstab like
/dev/hda5 ext3 defaults 1 0 everything allright, when i tried to iniciate something that must use X, it tells me it cant iniciate, tells that it cant conect to the server.. thanks for the help give until now.. :) |
while we're on the subject - what IS the difference between a primary and logical partition? i know u can only have 4 primaries and logicals start at hd?5 - but how do they relate on the disk? thanks :)
|
Re: Primary vs. Logical partitions
http://www.debian.org/releases/stabl...ioning.en.html Quote:
You pretty much always need to put the bootable sector of an installation into one of the primary partitions. Furthermore, you need to have a primary partition available in order to create further logical partitions. I don't know whether having the swap partition in a primary partition makes it faster. |
Ok its all fine now, but still, there is a problem, i cant execute nothing from my /home dir, for example enemy territory, when i try to run it, it says: /bin/sh permission denied.
Can someone know how do i fix this? thanks. |
well done getting it sorted - u probably have to change the permissions for /bin/sh, obviously depending on the user you are using to execute the files. maybe u could open a prompt as root and type in 'chmod 766 /bin/sh' and see if it works.
|
hehe i could figure it out by myself (after a lot of attempts)
Nope, its not permissions on /bin/sh. its in /etc/fstab, the properties of the partition, i left it like /dev/hda5 /home ext3 rw 2 1 and it works fine, thanks you all who answered me ;). |
All times are GMT -5. The time now is 11:11 PM. |