LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-14-2003, 01:56 AM   #1
Gomi
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48

Rep: Reputation: 15
Setting up /home on another drive


I've just reinstalled Win98 & RH9.

With Win98 I have 2 partitions C & D.
With RH9 I want / /var and /home. The first two were done when I installed RH9, but I couldn't do /home at that time because I wanted D and /home to be the same drive.

Would I set up /home to hda? in fstab, and is there anything I need to watch out for?
Or is it done with GRUB, and how do I edit things in GRUB?
 
Old 10-14-2003, 06:27 AM   #2
Slacker_Rex
Member
 
Registered: Aug 2003
Location: Arkansas
Distribution: Slackware 12.2
Posts: 104

Rep: Reputation: 15
You can set up home on your D drive. I don't know how RH will feel about settingit up on a Win partition (linux does not get along real good with NTFS as I understand it). All you have to do is make an empty directory (monut point) in your / with the command mkdir home. Once you have done that, add the line below to your /etc/fstab (or wherever RH puts it'st fstab).

/dev/hda2 /home vfat rw,umask=000,noexec 1 0

The example above mounts a Fat32 Filesystem. I beleive instead of vfat, you would use ntfs for the ntfs.

Good Luck
 
Old 10-14-2003, 07:47 AM   #3
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Or do you have a linux partition on your second drive you want to make /home? That should be really easy. Just mount that partition somewhere e.g.

# mount /dev/hdb2 /mnt

Then copy the files across:

# cd / ; tar cf - home | ( cd /mnt ; tar xvf - )

Watch the files whizz past. You should now have all you /home stuff also in /mnt/home

Then edit /etc/fstab to show the new location of /home, and reboot. Wait a while to see if everything is OK, then you can delete your old /home.

P.S. Before you reboot better rename /home to something else (like /oldhome) and make a new empty /home. Otherwise the new partition will mount on top of the old /home and you won't be able to access/delete it.

Last edited by maroonbaboon; 10-14-2003 at 07:58 AM.
 
Old 10-14-2003, 08:47 AM   #4
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

do all the above just one more thing if u want to have /home and not /mnt/home do the following delete old /home after moving everything to /mnt/home then create ln -s /mnt/home /home. this cmd will create a link to /mnt/home and all the users on the system will work on /home but this is actually pointing to /mnt/home making it oblivious to them.

chow
 
Old 10-14-2003, 09:58 PM   #5
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Yes I guess aqoliveira is right, you can just link to the new copy of home. But you still have to mount /mnt/home in /etc/fstab, and you might as weil mount it as /home rather than use the link. There was something wrong with my file copying command tho'. Mounting /home/someuser on /home puts it at /home/home/someuser, so I guess you should not copy the 'home' directory itself, and instead do

# cd /home ; tar cf - * | ( cd /mnt ; tar xvf - )

to transfer all the directories in /home to the new partition. Then rename original /home to /oldhome, make a new empty /home on the first disk and add a line in fstab to mount the new partition over the empty /home.
 
Old 10-15-2003, 06:00 PM   #6
Gomi
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Slacker_Rex

/dev/hda2 /home vfat rw,umask=000,noexec 1 0
I had a look at fstab last night and the entry for /var was
LABEL=/var /var auto ...... 1 2


I'm just wondering what the last two numbers on the fstab entry mean. (I couldn't find much in the man pages)

Thanks for your help.
 
Old 10-15-2003, 07:30 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,919

Rep: Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824
the first number is used by the dump command.
http://www.ussg.iu.edu/usail/man/linux/dump.8.html

The second number is a priority number used by fsck for filesystem checks during boot. If you see a maxium mount check and fsck running messages thats what determines which ones to check and what order. 1 is for root and 2 is for any other linux partition. Use 0 for non linux partitions like ntfs, vfat and CDs etc.
 
Old 10-26-2003, 01:26 AM   #8
Gomi
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48

Original Poster
Rep: Reputation: 15
is there somewhere else?

Thanks for all your replies. I've on setup fstab with for the home directory, and I now have the internet oworking at home. So I'm feeling good this weekend.

But I had another look at fstab...

LABEL=/ / ext2 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/var /var ext2 defaults 1 2
/dev/hda7 swap swap defaults 0 0
/dev/hda5 /home vfat defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/Win98 vfat defaults 0 0
/dev/hda5 /mnt/temphome vfat defaults 0 0

and it's the two lines with LABEL= I don't understand. Given what I've seen so far why wouldn't /var be
/dev//hda? /var .....
like I've done for /home.

It seams to me that / & /var are both defined else were, possibly in grub. Does any one know, because I don't know where to start.

Thanks,
Gomi
 
Old 10-30-2003, 07:16 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,919

Rep: Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824
You can assign labels to ext2 partitions just like in windows. When Redhat boots it looks for the label and not the partition ID. Of course you can still use /dev/hdxy to assign mount points.

The command is e2fslabel. I think you can also use tune2fs too.

The advantages to this method would be if you moved partitions around you wouldn't have to always edit the fstab file. The disadvantage would be if you had more then one RH version loaded you would get errors with multiple partitions with the same label.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Setting up a home network mrh7184 Linux - Wireless Networking 5 11-23-2005 11:59 AM
Setting up server from home joeman3429 Linux - Networking 10 11-06-2005 03:51 AM
Need help setting up a home network. joe83 Linux - Networking 7 08-09-2004 02:58 PM
Setting up a home network gi13s Linux - Networking 1 08-06-2001 08:37 AM

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

All times are GMT -5. The time now is 07:44 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration