LinuxQuestions.org
Register a domain and help support LQ
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-16-2009, 09:45 AM   #1
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 47

Rep: Reputation: 16
mount point for second hard drive


Hi everyone,

I am trying to mount a second hard drive on a clean install. Here is my hardware;

Gigabyte MA770-UD3 w/ Phenom 9950 BE
6 gig Corsair 800 mhz DDR2
1 x 40 gig Seagate SATA
1 x 500 Seagate SATA
Fedora 11

What I want to do is install my OS on the 40 gig and mount the 500 gig as my /home.

If I mount it after I install, I my home directory is deleted. I know I can just create a mount point and mount it there, but I would really prefer to mount it as /home.

Any suggestions?

Thanks
 
Old 08-16-2009, 09:59 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,750
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
Guess I don't really understand what you mean your "home directory is deleted." A line similar to the following in /etc/fstab will get your second drive mounted at /home
Code:
/dev/sdb1        /home       ext3        defaults      0   1
If there are already directories and files under /home (e.g., you've already created a non-root user), mount your second hard drive somewhere (e.g., /mnt/sdb) and copy everything under /home to the second drive. Unmount the second drive from the temporary mount point and re-mount it at /home. You should see everything that was in /home.
 
Old 08-16-2009, 10:11 AM   #3
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 16
Hi weibullguy,

What I mean by deleted is that the profile for any user is deleted form the home directory, i.e., if the user "test" is installed, then "test's" home directory is deleted when I mount the drive. I have tried the following mount points:

/dev/sdb1 /home ext3 defaults 0 0
/dev/sdb1 /home/test ext3 defaults 0 0

with the same results.

I am trying what you suggested, however, Nautilus is telling me that it is copying 195 gig form a 40 gig hard drive?!?! (I copied the hidden files also).

The problem with fedora is that it won't let you log in as root after the install, instead it forces you to create a user account, then log in as that user.
 
Old 08-16-2009, 11:14 AM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,750
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
That's what I thought you might have meant. Obviously, as you have figured out, the data is not really deleted. When you mount the second HDD at /home, there is nothing to "see" because there is nothing on the second HDD. Copying what exists under /home on the first HDD to the second HDD will resolve the problem.

Even if you can't login as root from GDM, you should be able to switch user (su) to root in a terminal. Open a terminal and try this
Code:
su -l
mkdir /mnt/sdb
mount /dev/sdb1 /mnt/sdb
cp -Rpv /home/* /mnt/sdb
umount /dev/sdb1
mount /dev/sdb1 /home
vim /etc/fstab
exit
You will prompted for the root user password after the first command. Replace /dev/sdb1 and vim with the appropriate device and your favorite text editor. When you edit /etc/fstab, add a line similar to the one in my first post to make sure your second HDD mounts at /home every time you boot.

Last edited by weibullguy; 08-16-2009 at 11:16 AM.
 
  


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
2 hard disks.. to look like 1 mount point alexxxis Debian 6 11-03-2007 12:29 PM
Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive MoMule Linux - Server 4 04-13-2007 10:34 PM
Moving a mount point to a new hard drive koremori@yahoo.com Linux - Hardware 2 02-19-2007 02:15 PM
Hard Drive Mount Point Question The Oate Mandriva 6 08-03-2004 09:25 PM


All times are GMT -5. The time now is 08:45 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