LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Moving the bootloader around (https://www.linuxquestions.org/questions/linux-general-1/moving-the-bootloader-around-141434/)

paul.nel 02-02-2004 01:11 PM

Moving the bootloader around
 
I have recently installed a new harddrive on my rh9 system as /dev/hdb. I installed rh9 to dual boot with the original installation on the existing harddrive. I want to move the existing harddrive to my suse box and spend a week to get my new installation up an running the way I want it. Now, I thought it would be as easy as changing my new hardrive to the master and disconnect the old one and boot up. Well not quite. The machine hangs during the boot up sequence at the spot where the boot loader (grub) normally takes over.

I assume this is because the boot loader is resident on the other drive. How do I move it or what else is there that I should know?

Tx
p.n

Rounan 02-03-2004 10:16 AM

First off, no offense intended, but make sure you've got rh9 installed on the drive that's in the computer, and not the one you moved. ;) Moving on...

I'm not familiar with GRUB, so I'm going to give instructions based on LILO - the concepts will be the same, just syntax will vary.

To install the bootloader to the mbr of hdb, I'd assume the command is:
grub /dev/hdb

(I know it would be: lilo /dev/hdb)

Before you do this, though, you have to take some things into account... Once you remove the old HD, /dev/hdb isn't going to be /dev/hdb anymore. It'll probably be /dev/hda.

Here's my recommendation:
BACKUP your existing grub config file
edit the config so that it removes reference to OS's on the hard drive you're removing.
Clone the rh9 entry, but rplace any reference to hdb with hda
name them appropriately: RH9 hda, RH9 hdb
run grub /dev/hdb

That should install grub in the MBR of the right drive, and let you boot whether your system is smart enough to maintain device locations, or not.
I imagine that the hda one will work - after you've got it booting, delete the other entry.

Footnote: You may have to edit the boot: variable in the config file instead of specifying as a command line option. Liek I said, I don't know grub. :)

Hope that helps,
--Rounan


All times are GMT -5. The time now is 06:46 AM.