LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2004, 04:51 AM   #1
s0ftwar3
LQ Newbie
 
Registered: Sep 2004
Location: Cascais, Portugal
Distribution: Slackware 10.0 kernel 2.4.26
Posts: 8

Rep: Reputation: 0
/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!
 
Old 09-23-2004, 05:36 AM   #2
darksmiley
Member
 
Registered: Jan 2004
Location: London, England
Distribution: Usually Linux Mint, Debian, Ubuntu or CentOS
Posts: 234

Rep: Reputation: 30
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
 
Old 09-23-2004, 05:40 AM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Code:
/dev/hdd6        swap             swap        defaults                       0   0
/dev/hda9        /                ext2        defaults                       1   1
/dev/hda8        /linux           ext2        noauto,owner,users,rw     1   2
/dev/hdb7        /home            ext2        defaults,owner,users,rw        1   2
/dev/hdd7        /var             ext2        defaults                       1   2
/dev/hdd8        /root            ext2        defaults                       1   2
/dev/hda6        /stuff           vfat        noauto,owner,users,rw     1   0
/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,users,ro     0   0
/dev/sda4        /zip250          auto        noauto,owner,users,rw     0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner,users,rw     0   0
devpts           /dev/pts         devpts      gid=5,mode=620                 0   0
proc             /proc            proc        defaults                       0   0
this is one of my LFS boxes.........I have various partitions spread over 3 hard disks..........plus a windows partition.......
 
Old 09-23-2004, 06:55 AM   #4
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
/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
 
Old 09-23-2004, 04:18 PM   #5
s0ftwar3
LQ Newbie
 
Registered: Sep 2004
Location: Cascais, Portugal
Distribution: Slackware 10.0 kernel 2.4.26
Posts: 8

Original Poster
Rep: Reputation: 0
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..
 
Old 09-24-2004, 07:21 AM   #6
darksmiley
Member
 
Registered: Jan 2004
Location: London, England
Distribution: Usually Linux Mint, Debian, Ubuntu or CentOS
Posts: 234

Rep: Reputation: 30
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
 
Old 09-24-2004, 08:10 AM   #7
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Re: Primary vs. Logical partitions

http://www.debian.org/releases/stabl...ioning.en.html

Quote:
6.3 PC Disk Limitations

``Primary'' partitions are the original partitioning scheme for PC disks. However, there can only be four of them. To get past this limitation, ``extended'' and ``logical'' partitions were invented. By setting one of your primary partitions as an extended partition, you can subdivide all the space allocated to that partition into logical partitions. You can create up to 60 logical partitions per extended partition; however, you can only have one extended partition per drive.
There's plenty more info on that topic.

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.
 
Old 09-28-2004, 09:56 AM   #8
s0ftwar3
LQ Newbie
 
Registered: Sep 2004
Location: Cascais, Portugal
Distribution: Slackware 10.0 kernel 2.4.26
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 09-28-2004, 05:50 PM   #9
darksmiley
Member
 
Registered: Jan 2004
Location: London, England
Distribution: Usually Linux Mint, Debian, Ubuntu or CentOS
Posts: 234

Rep: Reputation: 30
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.
 
Old 09-29-2004, 04:30 AM   #10
s0ftwar3
LQ Newbie
 
Registered: Sep 2004
Location: Cascais, Portugal
Distribution: Slackware 10.0 kernel 2.4.26
Posts: 8

Original Poster
Rep: Reputation: 0
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 .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending home partition pwilkie Linux - General 4 03-05-2005 07:32 AM
where /home partition is used imsajjadali Red Hat 1 09-11-2004 03:20 AM
/home seperate partition from previous install, make it new /home in new install mipia Slackware 5 06-21-2004 10:57 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM
/home - partition jt1020 Linux - General 12 05-08-2003 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration