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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-14-2003, 02:56 AM
|
#1
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48
Rep:
|
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?
|
|
|
10-14-2003, 07:27 AM
|
#2
|
Member
Registered: Aug 2003
Location: Arkansas
Distribution: Slackware 12.2
Posts: 104
Rep:
|
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
|
|
|
10-14-2003, 08:47 AM
|
#3
|
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Rep:
|
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 08:58 AM.
|
|
|
10-14-2003, 09:47 AM
|
#4
|
Member
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622
Rep:
|
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
|
|
|
10-14-2003, 10:58 PM
|
#5
|
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Rep:
|
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.
|
|
|
10-15-2003, 07:00 PM
|
#6
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48
Original Poster
Rep:
|
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.
|
|
|
10-15-2003, 08:30 PM
|
#7
|
Moderator
Registered: Aug 2002
Posts: 26,540
|
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.
|
|
|
10-26-2003, 01:26 AM
|
#8
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 3
Posts: 48
Original Poster
Rep:
|
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
|
|
|
10-30-2003, 08:16 PM
|
#9
|
Moderator
Registered: Aug 2002
Posts: 26,540
|
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.
|
|
|
All times are GMT -5. The time now is 02:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|