RED HAT 7.3 & Windows XP Dual Boot Help!

Here is the scenario. I have a Dell Dimension 8200 w/ 256MB RDRAM and Pentium 4 2.0GHz Processor and a 40GB harddrive. I installed Linux on this machine over the Windows XP that it initially came installed with. I recently bought a 200GB harddrive and installed it as the slave drive. When running fdisk my new drive is noticed and here are the results from fdisk -l

-------------------------------------------------------------

Disk /dev/hda: 255 heads, 63 sectors, 4863 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         6     48163+  83  Linux
/dev/hda2             7      4798  38491740   83  Linux
/dev/hda3          4799      4863    522112+  82  Linux swap

Disk /dev/hdb: 255 heads, 63 sectors, 24321 cylinders
Units = cylinders of 16065 * 512 bytes

Disk /dev/hdb doesn't contain a valid partition table

-------------------------------------------------------------

I would like to install XP on the /dev/hda where RH 7.3 currently is and move RH 7.3 over to the 200GB /dev/hdb. I do not currently possess a writeable CDROM or a ZIP drive to store the contents in my home as well as in my Linux partition. I presume I could copy it to /dev/hdb but I am not certain that it will work once it is moved over. I would also    like to make another partition on hdb with the original RH 7.3 distribution as I have added many more packages to the Linux partition I'm currently using so that when I modify it this time I can actually keep a record of modifications I have made. If possible I would like to have GRUB as my bootloader although this is not absolutely necessary. If one could help also with a better partitioning scheme than the one I currently have I would greatly appreciate that. An explanation of mounting filesystems will be helpful as well. Thank You.

ecrouseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fluid11Commented:
{Option 1}

Create a partition on /dev/hdb that will contain anything that you want backed up.  Don't use the entire space on the drive.  Use the "fdisk /dev/hdb" command to create the partition.  This will bring you into an interactive menu where you can create the partition.  Format the partition with "mkfs -t ext3 /dev/hdb?".  

Copy anything that you don't want to lose to the newly created partition on /dev/hdb.

Install Windows XP on the first hard disk (/dev/hda).  During the setup, delete any partitions you see on the first disk (don't delete anything on the 200Gb drive).  Before you install XP, it would be a good idea to wipe out the MBR first.  If you have a bootable Win9x disk, boot from it and then run "fdisk /mbr".  You can also download a utility called "delpart" that will delete your MBR.  You can probably run the "fdisk /mbr" command from Linux (before you get rid of it) to kill anything in the MBR (LILO or GRUB).  

After Windows is installed, boot from the Redhat CD and install Linux to the second disk.  When it comes to partitioning, create a 100Mb (or less) /boot partition, a swap part, and a / partition.  The rest of your partitioning depends on your needs.  If this is just a workstation, the above is really all you need.  For a server install, you probably want some custom paritioning that would depend on the services you are going to run.  One option that you can do is...

100Mb /boot
512Mb <swap>
1Gb /
199Gb /backup (partition created earlier).  

Make sure that you do not select your backup partition to be formatted.  

During the bootloader portion of setup, select GRUB and install it to the MBR.  It usually does a good job of picking up any other installed OS's, if not, just post back and we'll walk you through editing the grub.conf file.  




{Option 2}
First create a boot disk for your existing Linux installation on /dev/hda with this command --> mkbootdisk.  Verify that the disk works by booting from it.  

Boot from the Redhat CD and enter Recovery mode.  In recovery mode, you should be able to mount your 3 paritions.  It will put your root directory into something like /mnt/sysimage.  From here, run "fdisk /dev/hdb" and create the partitions that you want to use (see partitioning above).  Format the partitions with "mkfs -t ext3 /dev/hdb?".  After the partitions are created, you can just copy the contents of the old partitions to the new ones, or you can try using the dd command.  I'm not sure if this will work, but you can try this on each unmounted partition...

dd if=/dev/hda1 of=/dev/hdb1

If the above worked, make sure that now have copies of all your partitions on /dev/hdb.  

Next, install GRUB on /dev/hdb with "grub-install /dev/hdb".  Check that the grub files exist in /boot/grub on the new / partition on /dev/hdb.  

Reboot the computer and see if it boots into your new Linux installation on /dev/hdb.  If this worked, create a boot disk for the new Linux installation, install Windows to /dev/hda, boot from the boot disk and reinstall GRUB (like above).



ChrisP

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ecrouseAuthor Commented:
I have a few brief questions about the process of copying over. I was able to create a partition and format accordingly. Now should I copy over all of /dev/hda onto  /dev/hdb using the dd command? If I use dd is it necessary the to and from partitions are exactly the same size? If I copy over using dd if=/dev/hda of=/dev/hdb bs=? count=? will my original directories exist and if so how do I access them. I know that they sould be mounted, I am not sure in general how to access anything in /dev/hdb once it is over there or if I should only copy over the Linux (hda2) and create a new swap later and a new boot partition as well.
0
fluid11Commented:
I don't think it should matter that they are exactly the same size.  I'm not sure on the byte size, as I haven't done this in awhile.  You can always just copy everything over using a simple 'cp -pr', if dd doesn't work.  

After you copy your data over to /dev/hdb, just mount the partition to access it.  If you use dd and cp correctly, your original paritions on /dev/hda should be left unchanged.  When using dd, the partitions should NOT be mounted.

You can create your swap partition on /dev/hdb using fdisk. Create a paritition with partition ID 82 (Linux swap).  

ChrisP
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

fluid11Commented:
...actually, I just though of a problem with Option 2.  There are going to be some references to file locations on the old drive.  /etc/fstab is an example of a file that your going to have to edit to reflect the changes.  You might have a few shortcuts in /dev that might need some updating also, like /dev/cdrom and /dev/floppy, for example.  Let us know if you have any problems after you boot into Linux on the second disk.

ChrisP
0
ecrouseAuthor Commented:
when copying over I noticed that the data migration was taking a long time and so I became scared and stopped the process... I stopped it maybe after 40 minutes of CPU time. Is this normal. Secondly, in option1 instructions you suggested that I create a partition hdb? which I naturally named hdb1 and then formatted the partition with mkfs. However, because I originally had three (3) partitions on hda when I used dd if=/dev/hda of=/dev/hdb  I automatically saw three partitions upon using fdisk -l. I presume this to be OK eventhough I'm not sure. Should I be copying these over one partition at a time or is it OK to copy over the whole /dev/hda over to /dev/hdb and get 3 partitions after only manually creating one...unusual.
0
fluid11Commented:
I would just create a partition on /dev/hdb that you will only store data that you want to keep on.  After that, you'll need a /, /boot, and <swap> partition for the OS.

I'm not sure exactly what you did, but lets see the output of "fdisk -l /dev/hda" and "fdisk -l /dev/hdb".  

By the way, if it was me, I would definitely do Option 1.  Its much safer and cleaner that way.

ChrisP
0
ecrouseAuthor Commented:
[root@localhost root]# fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 4863 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         6     48163+  83  Linux
/dev/hda2             7      4798  38491740   83  Linux
/dev/hda3          4799      4863    522112+  82  Linux swap

Disk /dev/hdb: 255 heads, 63 sectors, 24321 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1         6     48163+  83  Linux
/dev/hdb2             7      4798  38491740   83  Linux
/dev/hdb3          4799      4863    522112+  82  Linux swap
0
fluid11Commented:
Looks like the dd command copied the partitions exactly.  Does a 'df -h' show that each partition is using the same amount of space?  If it does, then you probably copied everything already.  If your short, you can use the rsync utility to synchronize the partitions and only copy files that you don't have.

ChrisP
0
ecrouseAuthor Commented:
I think that you're correct. Now the problem is everything has been copied over I cannot seem to mount /dev/hdb or any of its partitions this is what I get.

[root@localhost root]# mount /dev/hdb
mount: can't find /dev/hdb in /etc/fstab or /etc/mtab

or...

[root@localhost root]# mount -t ext3 /dev/hdb /backup
mount: wrong fs type, bad option, bad superblock on /dev/hdb, or too many mounted file systems

in which I believe I have too many mounted file systems. I do not think I can mount two filesystmes from seperate devices at the same time. So how the heck do I unmount the filesystem I need at all times because it (hda2) claims to be busy to access the one on the other drive hdb?
0
fluid11Commented:
You can't mount an entire disk, only partitions.  

mount -t ext3 /dev/hdb1 /mnt/somedir
mount -t ext3 /dev/hdb2 /mnt/someotherdir

You won't be able to unmount / on /dev/hda, because your OS is currently running on it.  

ChrisP
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.