LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2006, 02:19 PM   #1
XicKy
LQ Newbie
 
Registered: Nov 2006
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 0
installing HDD that has GRUB on it to another computer


Hi. I have a HDD that has GRUB on it in a computer. The disk is the master on an IDE channel. GRUB was installed when I installed debian on the master. I had a previous install of Debian on the slave.
So I could choose to boot from either the master disk or slave disk.

Ok, now the problem. I tried taking the master disk out and installing it as the slave in another computer(I think I set the jumpers right but to be honest I'm not sure).
I used the Ultimate Boot CD to choose to "boot the second drive" and then was presented with the GRUB menu which I guess was still configured for the old setup. Now the installation that I want to boot to is hdb(it was hda in the other computer) so I chose that one and it would start to boot but it would fail to start services and then hang at a message something like "starting syslogd" or something like that.

I put the disk back in the other computer to make sure I didn't hurt it or something when I pulled it out and swapped it. It still works ok in the other computer.


I'd imagine its a problem with the GRUB configuration but I'm not sure because it starts to boot but doesn't get all the way through it.

Here is what I think is the relevant part of my menu.lst file:

--- START FILE SNIPPET ---

title Debian GNU/Linux, kernel 2.4.27-3-386
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-3-386 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.27-3-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-3-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-3-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.27-3-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb1.
title Debian GNU/Linux, kernel 2.4.27-3-386 (on /dev/hdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.4.27-3-386 root=/dev/hdb1 ro
initrd /boot/initrd.img-2.4.27-3-386
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb1.
title Debian GNU/Linux, kernel 2.4.27-3-386 (recovery mode) (on /dev/hdb1)
root (hd1,0)
kernel /boot/vmlinuz-2.4.27-3-386 root=/dev/hdb1 ro single
initrd /boot/initrd.img-2.4.27-3-386
savedefault
boot

--- END FILE SNIPPET ---

The other disk that's in the computer I'm trying to isntall to has windows 2000 on it.
I should probably isntall grub in the boot sector of the master disk shouldn't I? But if I do that what do I don't with the present installation of GRUB?
 
Old 12-04-2006, 02:52 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
OK--count to ten, deep breath

GRUB setup is dependent on the specific computer config--ie what drive is where. It knows to look for---eg---"funlinux" on drive 1. If the drive is put in the #2 spot, GRUB will happily go looking in drive 1 for funlinux.

Maybe the easiest way to proceed is to put your Linux drive as #1, and the Win2K drive as #2. Don't put them on the same bus---eg primary master = #1, secodary master = #2. This way, you can exchange files more quickly between the two.

You should then be able to boot into Linux.

Next, you will need to change the GRUB config file to point to Windows. Because Windows always thinks it's #1 (Big ego...) you have to use the GRUB map command.

The entry will look something like this:

Code:
title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive
chainloader +1
 
Old 12-04-2006, 03:34 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
No modern operating in the world can tolerate alteration to the disk from which it was installed. It cannot boot in a new environment if all the records show the information is in the old environment (like the addresses of the hard disk to pick up files to boot).

Linux is probably the easist one to move from disk to disk or PC to PC if the following rules are adhered to

(1) The boot loader file /boot/grub/menu.lst must has the "root", "kernel" and "initrd" (can be optional in some distros) statements edited to reflect the new disk/partition environment. For a distro using Lilo the corresponding "image=" or "root=" will need to be altered.

(2) A Linux must load some files and the files to be loaded is stated in /etc/fstab. All the disk/partition references must be edited to reflect the new environment.

(3) If the distro is moved to a new PC the hardware change can render the Linux fail to display and so the /etc/X11/xorg.conf should be edited to reflect the new display driver. (similarly for a dead mouse)

It can be moved as I have done over a hundred times and across 3 PCs this way. I don't re-install a distro unless it packs in and that is usally 3 to 4 in a 100.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent: Installing debian etch on a new hdd but grub won't install (fatal error) MrInept Debian 4 09-14-2006 08:54 AM
[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails Akhran Linux - Newbie 2 05-04-2006 04:17 AM
how to do a dual boot (Windows on portable HDD) linux on computer HDD izquierdista Linux - General 5 01-28-2006 09:50 AM
GRUB boot loader and installing multiple distributions on one computer juyce Linux - General 3 06-27-2005 06:13 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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:23 AM.

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