LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-18-2006, 01:32 PM   #1
SonicGT
Member
 
Registered: Oct 2004
Posts: 38

Rep: Reputation: 15
Transfering hard drive w/ linux from separate computer to dual boot with Windows comp


Sorry if the topic title seems kind of wordy, but I really couldn't think of what to say.

Until recently I have been running two computers, one with Debian Linux and the other Windows XP. Sadly, about a week ago the motherboard or CPU crapped out on the linux computer(yes, I have checked to see if the two sticks of RAM I had in there were bad, but they weren't). Thus, I want to transfer the hard drive with Linux over to the Windows computer and configure both for a dual boot. Linux is using GRUB, and I'd prefer it to be a slave drive and Windows the primary. If it's quite a hassle to do this, I'd rather reinstall Debian, for I have the /home directory separate from / and thus wouldn't lose anything. What should I do to accomplish this?
 
Old 03-18-2006, 02:56 PM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Basically the following:

1) boot into your linux setup using a rescue disk

many install disks are also rescue disks and some even provide a specific feature /instructions to get back into your system again. Basically it comes down to mounting your / dir somewhere under mount and then pointing chroot to that location to use this as the new assumed root. If you have a seperate /bot partition, this is the time to unmount it and mount it again to make sure the right partition it being used.


2) edit grub.conf

change "root (hd0,0)" for "root (hd1,0)" since linux is now on the second harddisk and adapt any other indications of the location of your installation accordingly.


3) add a line for windows

title windows
root (0,0)
chainloader +1


4) install grub to the MBR

"grub-install /dev/hda" will do.


5) reboot to check everything works fine.

make sure to write down how to reinstall the windows bootloader in case something fails and you need to get it back. If I remember correctly fro xp you boot fromm the cd and from rescue mode tell it to 'fixmbr', but you'd better check up on that.
 
  


Reply



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
Moved hard drive with dual boot to another computer atlaika Linux - General 6 11-05-2005 05:38 AM
Dual boot with 2 separate hard drives and OS lfierro Linux - Newbie 8 12-11-2004 02:37 PM
just installed Gentoo on separate hard drive, dual boot question Gates1026 Linux - Newbie 10 05-04-2004 03:11 AM
Dual Boot on Separate Hard Drives? theonlylivinggo Linux - Newbie 6 02-26-2004 04:15 PM
dual boot w/ separate hard drives? aveach Linux - General 2 09-15-2003 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:03 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
Open Source Consulting | Domain Registration