Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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.
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.
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.
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.
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.
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.