LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-02-2005, 03:53 PM   #1
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Rep: Reputation: 15
Question 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?
 
Old 08-02-2005, 04:04 PM   #2
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
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.
 
Old 08-02-2005, 04:35 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
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.
 
Old 08-02-2005, 04:36 PM   #4
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
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.

Last edited by anilnatha; 08-02-2005 at 04:39 PM.
 
Old 08-02-2005, 04:39 PM   #5
anilnatha
LQ Newbie
 
Registered: Jun 2003
Distribution: Red Hat 8.0, 9.0
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
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?

Thanx!

Last edited by anilnatha; 08-02-2005 at 04:40 PM.
 
  


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
SATA Hard Drive Corruption with Folding@Home Matir Linux - Hardware 3 04-28-2005 05:32 PM
mount new hard drive as /home filpee Debian 3 02-27-2005 12:24 AM
backing up a directory to another hard drive aducarrab Linux - Newbie 1 01-29-2005 09:27 PM
How to make My Documents my home directory foxy123 Suse/Novell 6 12-29-2004 02:49 PM
/home seperate partition from previous install, make it new /home in new install mipia Slackware 5 06-21-2004 10:57 PM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration