Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 02-22-2005, 11:55 AM   #1
Registered: Jul 2003
Location: London, UK
Distribution: Ubuntu, Slackware
Posts: 42

Rep: Reputation: 15
Adding A New HDD as a new /home & for 2nd OS

I have a 20gig hard disk with slackware on it & it runs pretty nice on on my old AMD however I have 20gigs of music & about 30 of backed up DVDs so I want to add another hardrive and move slackware's /home partition onto it, keeping the rest of the system on the original 20gig drive.

The second hard drive is 200gig & will be set to slave on the DVD drives IDE channel. I also want to install Windows XP on the second drive (needed :[) on a 10gig partition & ubuntu linux sharing the new home.

can anyone help with moving /home or point me in the right direction. Thanks.
Old 02-22-2005, 05:07 PM   #2
Registered: Jun 2004
Location: Cleveland, Ohio, USA
Distribution: LFS
Posts: 35

Rep: Reputation: 15
First off I am going to assume you will be using the first partition on the second drive as your XP partition, and the second partition as your /home partition. And from now on I will refer to your root fs partition as /dev/hda1 and your /home fs as /dev/hdb2.

You could set things up like this:

First copy everything from /home to the root of the second drive:

1. Mount the second drive to a temporary mount point:
mount /dev/hdb2 /mnt/temp
2. Copy everything from /home to the root of the second drive with the archive option. This will preserve file permissions and ownership:
cp -a /home/* /mnt/temp
Now that you have a copy of everything that was in /home on the second drive you can mount that drive under /home. Here is an example of the relevent lines of fstab:
# /etc/fstab

/dev/hda1   /       /ext3   defaults   1   1   #Your root partition - this should already be in fstab
/dev/hdb2   /home   /ext3   defaults   0   0   #Your /home partition - you will have to add this
Now this leaves everything that was in /home still there on the root partition. With /dev/hdb1 mounted on /home you will not be able to see this. I would try setting things up like this and then reboot and check the output of df to see that /dev/hdb1 got mounted on /home and that you can login fine and access your home directories. Once you are satisfied you can switch to single user mode and unmount /dev/hdb1 from /home and delete anything within that directory. Then remount /home and switch back to multi-user mode.

Hope this helps.
Old 02-23-2005, 09:37 AM   #3
Registered: Jul 2003
Location: London, UK
Distribution: Ubuntu, Slackware
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks. I'm going to put the drive iin & give it a try in about an hour


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
I need a step by step help to instal Suse 9.3 Pro on the same hdd as XP Home & 2003 suse91pro Linux - General 4 09-07-2005 01:15 PM
Problem with a 2nd hdd Dark_Sniper* Linux - Hardware 10 05-19-2005 08:21 PM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 09:16 AM
2nd HDD TBBA Linux - Newbie 5 05-03-2002 01:40 PM > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration