LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-02-2005, 02:52 PM   #1
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
New partition setup and HD swapping


OK, first let me apologize if this has been covered a thousand times and I just couldn't find the old threads, but I haven't come across this question, and I really could use some direct advice. I feel like I'm graduating just past total noob status, and I thought some of you more experienced folks might take interest in helping me reshape my system. There are a few things I think I want to do:

1. Replace current 20GB drive and dead 60GB drive with my newly purchased two 120GB Seagate drives from Best Buy ($30 each!). I know how to do the hardware (I've already replaced the dead slave with one of the Seagates), but I'm not sure what the best way would be to install the other one while hopefully not installing Suse from scratch. I'm (don't laugh) currently on dial-up connection, and it really has been a pain to get things working (pain in the ass intel winmodem driver, nvidia video driver, and all I currently have is the out of the box version of suse personal 9.1).

2. I would like to be able to install windows xp as a dual boot, just for purposes of running the office suite that is important for grad school compatibility with group members, course documents, etc. I might also like to leave a partition to install another linux distro.

3. I would like to set up a low hassle system of backing up probably <20 GB of important files, including pics and video, and any other important system stuff that you would recommend.

4. I am interested in the concept of keeping /home away from the rest of the operating system, like on a different partition, for benefits of recovering from a crash of the partition with the OS or from a need to reinstall or whatever. Also, do people dual-boot multiple linux OS's which all use the same /home?

It seems me to me that most of this is not uncommon, but I have little confidence that I can pull it off. Nor am I sure that it is a good idea to do things like trying to copy disk images from old drives to new or separate /home or can I actually install XP after I have linux installed or will it try to screw up everything I have done during it's installation.

I know this might sound like quite a project, but I'm hoping that some of you with experience might take an interest in helping me through it. Thanks!

LB
 
Old 12-04-2005, 09:56 AM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
Ok, first of all I would recommend installing the windows first, otherwise it will overwrite your bootloader when you install it after Linux. This can be fixed but it's easier to just avoid it completely.

Yes, you can make /home it's own partition, not at all unusual.

I'd recommend installing the new drive and leave the old drive in place until finished. Create your partitions, install windows, then copy your old drive data to the new partions using the dd command.

Don't forget to edit your fstab.

lastly, you'll want to install your bootloader, configured for the new drive/partition parameters, and you should be good to go.
 
Old 12-04-2005, 12:31 PM   #3
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
If you use 2 HDDs you could install windows on one and copy suse to the second.Make sure the windows HDD is master or windows will complain. Read up on copying files from one partition to another with dd. Then make your partitions and copy your present /home folder to the /home partition and after chacking that went well, deelte it from the original drive. Then copy the rest of the data to your new root partition. Make sure to change fstab settings to reflect the changed partition setup and also change grub.conf along the same lines before you (re)install grub. Safest way to do all this is with a live distro!
 
Old 12-05-2005, 04:36 PM   #4
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
What is the big deal about dd?
 
Old 12-06-2005, 07:18 AM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
What is your question?
dd is the 'standard' tool for this kind of operation.
 
Old 12-06-2005, 10:29 AM   #6
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
sorry, more specifically, what is the difference between dd and cp? aren't we just copying files?
 
Old 12-06-2005, 11:29 AM   #7
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Yes and no. I don't know enough of the specifics of the command o really point out the finer details of the diferences, but have a look at the wiki entry for dd and see how it is used for backing up and copying partitions.
 
Old 12-10-2005, 02:15 PM   #8
lnebrown
Member
 
Registered: Sep 2004
Location: Seattle
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
How does this sound:

Copy my old 20GB (linux) drive to my new 120GB drive doing something like:
1. Install the target 120 drive as slave, copy the entire master with a command
Code:
dd if=/dev/hda of=/dev/hdb conv=notrunc,noerror
(from the "How do do everything with DD" tutorial). Will there be any problems due to the 20 and 120 GB drives being different sizes/brands? Could I install this new drive as master and run just like my previous setup, simply with an extra 100GB to play with? (I will probably make a separate partition for /home). Will it make my swap

2. Install windows on my 2nd new 120 GB drive by installing just this drive and completing typical installation.

3. Make this 120 drive(with windows) the master and install my other new 120 (linux) as the slave. I only say make windows the master because of linmix's advice. Am I losing any linux capability by doing this? Any details on what windows will "complain" about? It is always complaining about something, isn't it...

4. I suppose now I need to install GRUB on the MBR of the master windows drive. Then edit fstab (because it would have references to hda* rather than hdb* due to the direct copy from the original 20gb drive. Would all of this be easiest to do by booting from my live cd? I haven't done much of this.

5. Here I should be able to hit power, choose linux, resize hdb2(root), create hdb3 (for /home), mount hdb3 under a some tag other than /home, copy everything from /home to hdb3, delete /home, and finally mount hdb3 to /home.

what do you think?

thanks for the advice thus far!

LB
 
Old 12-11-2005, 10:19 AM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Quote:
Originally Posted by lnebrown
How does this sound:

Copy my old 20GB (linux) drive to my new 120GB drive doing something like:
1. Install the target 120 drive as slave, copy the entire master with a command
Code:
dd if=/dev/hda of=/dev/hdb conv=notrunc,noerror
(from the "How do do everything with DD" tutorial). Will there be any problems due to the 20 and 120 GB drives being different sizes/brands? Could I install this new drive as master and run just like my previous setup, simply with an extra 100GB to play with? (I will probably make a separate partition for /home). Will it make my swap
Different partition sizes would only be a problem if the amount of data you are transferring is bigger than the destination partition.

You could then install it as master and have it work, provided you also install grub on the MBR first. (I believe there's some info on how to do that with dd on the wiki page also)

... provided the pasrtition scheme that grub needs to recognize is the same a before (otherwise you'll have to change Grub to reflect it). The dd command will copy chunks of data, not partitioning info, so making a swap partition and even making the partition you are going to dd to must be done by you beforehand.

Have a look at your current partitioning scheme with fdisk -l. Then use fdisk (with the new drive plugged in as slave) to make the necessary partitions and read up on mkfs to create the file system(s). Alternatively get a GUI tool like QTparted to do all of this.

Quote:
2. Install windows on my 2nd new 120 GB drive by installing just this drive and completing typical installation.
Perfect

Quote:
3. Make this 120 drive(with windows) the master and install my other new 120 (linux) as the slave. I only say make windows the master because of linmix's advice. Am I losing any linux capability by doing this? Any details on what windows will "complain" about? It is always complaining about something, isn't it...
You'll not lose outon any linux capabilities. It should technically be possible to install windows on a slave drive, but all the posts I've read about this say that then you need to trick windows into believing the slave drive is actually the master drive. I've never done this myself, but sinec linux will go anywhere there's no need to tempt fate

Quote:
4. I suppose now I need to install GRUB on the MBR of the master windows drive. Then edit fstab (because it would have references to hda* rather than hdb* due to the direct copy from the original 20gb drive. Would all of this be easiest to do by booting from my live cd? I haven't done much of this.
If you have a good live cd (e.g. knoppix) the big advantage is that you'll be able to do everything in a gui environment. You can also use the rescue option of your disto, which will also work just fine, but from the command-line.

Quote:
5. Here I should be able to hit power, choose linux, resize hdb2(root), create hdb3 (for /home), mount hdb3 under a some tag other than /home, copy everything from /home to hdb3, delete /home, and finally mount hdb3 to /home.
As outlined after 1, I'd do all of this before moving the data to the new HDD. Partitioning is always risky business. Nothing should go wrong, but what if it does. It might be a major disaster. Do your partitioning before transferring data to the new drive (if possible)
 
  


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
How to Partition and setup Bootloader Ozzy Linux - Newbie 4 01-24-2005 07:42 AM
Looking for opinions on a partition setup atheist Linux - General 5 06-11-2004 09:57 PM
partition setup cxtech Slackware 4 03-05-2004 02:30 AM
how to create a partition for swapping data between win2000pro and red hat 9.0? Mephisto3285 Linux - Newbie 3 07-04-2003 06:11 PM
Help with setup/partition Netrack Linux - General 7 01-15-2003 09:39 PM


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

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