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!
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.
I just loaded a desktop as a dual boot with XP and Fedora. I set up all of my partitions successfully, but as I was installing Linux, I didn't set a mount point to my second Linux partition (I have two main partitions set up for use with Linux, one for the OS and one for my data; a third partition is for swap). So I pointed my / mount to the right partition, but didn't define the mount point for the partition I want to use for data directories.
I'm thinking that I'd like to assign the data partition as /home. I haven't done anything with the machine yet, so it wouldn't be a big deal to just reinstall, but there must be a more elegant way than that to repoint my /home directory to an open partition.
the easiest way i can think of would be to either boot knoppix and edit /etc/fstab on the root drive or boot red hat recovery console from install cds remount disk to read write and also edit /etc/fstab. unless of course your system already boots, then just edit fstab when booted, format and mount your future /home on /tmp, then copy (or move) everything from current /home to new /home (that's right now on /tmp), check that you setup /etc/fstab correctly and reboot. once it comes up your /home will be on the new place.
I know i gave very generic info here, if you need actual commands let me know and i'll write out the exact directions.
Cool. Everything boots up fine, so that makes things easy. I'm going to try to take a crack at this now, and I'll apply it later when I get home. I think I've got it, but let me know if I'm screwing things up.
There are a few steps here...
In fstab, I would want to have a line that looks like this:
/dev/hda5 /home ext2 defaults 0 0
Then in terminal, if the partition is not formatted, I would want to:
mkfs.ext2 /dev/hda5
Then I would move the contents of the /home folder to /tmp/home, and delete the original /home folder. When I reboot, the computer should recognize /dev/hda5 as the /home directory, and I can move everything from /tmp/home back to /home.
That's what I was thinking, but I didn't want to destabilize the system.
Thanks a lot.
Originally posted by 1speedjb Cool. Everything boots up fine, so that makes things easy. I'm going to try to take a crack at this now, and I'll apply it later when I get home. I think I've got it, but let me know if I'm screwing things up.
There are a few steps here...
In fstab, I would want to have a line that looks like this:
/dev/hda5 /home ext2 defaults 0 0
Then in terminal, if the partition is not formatted, I would want to:
mkfs.ext2 /dev/hda5
Then I would move the contents of the /home folder to /tmp/home, and delete the original /home folder. When I reboot, the computer should recognize /dev/hda5 as the /home directory, and I can move everything from /tmp/home back to /home.
That's what I was thinking, but I didn't want to destabilize the system.
Thanks a lot.
Alright since you missed a critical step i'll go into details on commands:
hda5 is the partition for new /home
fstab:
/dev/hda5 /home ext3 defaults 0 0
as root:
mke2fs -j /dev/hda5 (make partition ext3, ext2 is too old)
mount /dev/hda5 /tmp (mount hda5 onto /tmp folder)
mv /home/* /tmp/ (move /home will also take care of erasing contents of /home by not leaving a copy)
ls -l /tmp (this will show stuff like user1, user2, etc)
umount /tmp (cleanly unmount hda5)
reboot
Awesome. Thanks so much for your help. Everything is all set up.
Last night I was also able to mount a Windows partition, get my modem configured, and set up the printer. I'm riding high on a wave of Linux victory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.