How do you install a new hard drive and make it the new /home directory???
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
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.
How do you install a new hard drive and make it the new /home directory???
Alright, before I commit to upgrading my hard drive on my Linux Machine I wanted to find some things out.
Currently my machine has two hard drives. The primary has linux installed on it, the second is setup as "/home"
The second hard drive with the user files (/home) is the one I want to upgrade.
is it as simple as copying all the contents from the exisiting /home directory to the new hard drive, and then configure linux to label the new hard drive as /home instead?
What exactly do I need to do to accomplish this task?
That's exactly what you do. You can boot to single user mode, mount the new drive under /mnt and simply mv home/ to mnt/ then modify /etc/fstab to mout the new drive using /home as the mount point, then reboot.
If you need more help read:
man mv
man mount
man fstab
then if you have any questions post back here again.
Actually, you don't need to modify your fstab, assuming you stick the upgraded drive in the same location as the original drive (e.g. master of secondary IDE).
Also, you'll presumably want to cp the files rather than mv them. You'll want to use the options -rp to copy recursively, and to preserve ownership/permissions/etc.
Originally posted by KimVette That's exactly what you do. You can boot to single user mode, mount the new drive under /mnt and simply mv home/ to mnt/ then modify /etc/fstab to mout the new drive using /home as the mount point, then reboot.
If you need more help read:
man mv
man mount
man fstab
then if you have any questions post back here again.
I didn't think it'd be that easy but is definetly something I can easily tackle.
Originally posted by IsaacKuo Actually, you don't need to modify your fstab, assuming you stick the upgraded drive in the same location as the original drive (e.g. master of secondary IDE).
Yea, that's what I thought myself. after reading Kimvette's reply.
Quote:
Originally posted by IsaacKuo
Also, you'll presumably want to cp the files rather than mv them. You'll want to use the options -rp to copy recursively, and to preserve ownership/permissions/etc. [/B]
Yea, I didn't type what I was thnking. I meant copy not move. Good catch though.
Your reply answered my other question in my previous post.
So basically if I'm logged in as root, and cp all the files from the old drive to the new one, it will copy everything including files that don't belong to root?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.