Changing bootloader location

Because I had Windows installed first, the bootloader was located in that drives master boot record and the openSUSE drive was slaved to it. Now that Windows is gone and the Linux drive is bigger and faster (although the same Ide (pata) ata rating. There are no sata devices in my system.) I want to reverse the master slave relationship between those two drives and put the bootloader on the openSUSE drive.

At the moment a single instance of openSUSE 11.4 is the only operating system installed on the computer I’m talking about.

What procedure should follow to accomplish that?

You mean you have 2 HD’s and want to change the boot order and reinstall grub to the new master?

If so, it’s more complicated, because hdb will become hda
So your menu will need re-writing and fstab may need adjusting.

and /boot/grub/device.map needs to reflect the drive mapping BEFORE you install the bootloader. You’ll better edit this file first. Whether the Grub installer uses it or ignores it depends on the options passed to the script - and so on the method used to install Grub (YaST, command line, whatever …)

Because I had Windows installed first, the bootloader was located in that drives master boot record and the openSUSE drive was slaved to it. Now that Windows is gone and the Linux drive is bigger and faster (although the same Ide (pata) ata rating. There are no sata devices in my system.) I want to reverse the master slave relationship between those two drives and put the bootloader on the openSUSE drive.

At the moment a single instance of openSUSE 11.4 is the only operating system installed on the computer I’m talking about.

What procedure should follow to accomplish that?

So, if this was me, I would consider doing one of two things:

  1. Wait till openSUSE 12.1 comes out, swap the drives then and reinstall openSUSE.
  2. Swap the drives now and reinstall openSUSE 11.4.

In both cases, edit the install section to reuse existing partitions and make sure your separate /home area (if you created one) is not reformatted, but just mounted as is. Then, all of your personnel settings are maintained and you only need to reinstall any missing applications once the main install is complete.

Thank You,

Is what you want to do really that necessary?
Would it be prudent to just wait until your next installation of openSUSE (12.1?)

Wow fast replies. Yes I have two hard drives. Originally there was just one and it had Windows XP installed on it. Later on I bought a new hard drive and installed it into the system with the first one and installed openSUSE on it. I had that slaved to the Windows drive because Windows needs to be on the C: drive meaning it had to be the master. The bootloader installer defaulted to the master boot record on the Windows drive at that time so I just accepted that setting and it has worked fine that way ever since.

Now Windows has been wiped from my system and I want to make the drive openSUSE is on the master and the drive that Windows used to be on the slave and I want to install the bootloader on the openSUSE drive.

Can you tell me exactly what I need to do that?

I’ll be happy to answer any more questions about the specifics of my system setup that you need to know the answers to.

Thanks.

If you didn’t mess up with your /etc/fstab or didn’t follow wrong advices provided in some howtos (sorry, I couldn’t resist :wink: ), you shouldn’t have to change anything in /etc/fstab. What you have to do:

  • edit /boot/grub/menu.lst and replace any occurence of hd1 with hd0 (cannot be 100% sure because I haven’t seen this file).
  • edit /boot/grub/device.map so that (hd0) points to the new master.
  • reinstall Grub on hd0 MBR

No. It is not necessary to do it right now. I can wait till 12.1. I just thought maybe I could use the bootloader app in Yast to do it fast and easy and then just physically swap the drives.

“Reinstall” grub?

Yes we can. lol!

How are you booting openSUSE right now?

The only reason I wanted to do it now was because I was thinking using the other drive to try out other operating systems which could’ve wiped my current bootloader if I didn’t find a way around it…

I’m pretty certain that in the current installation of openSUSE that grub was installed into the master boot record of what was the Windows XP drive at the time. Grub is set to boot into openSUSE by default. That’s how I’m booting into openSUSE now.

Hmmm… I later formatted the Windows drive with ext 4 and but the Mbr still contains grub, so when I do the reinstall of openSUSE later I guess I’m going to want to know how to remove that.

You don’t need to explain the reason but tell us how you are booting openSUSE now! Since you seem to have switched the HDs already, I wonder how/what you are booting.

I’m pretty certain that I could fix your problem (almost) with my eyes closed but I’ll need your collaboration for that. So if you don’t mind answering my questions … How are you booting openSUSE now?

No, no. I haven’t done anything to the system yet at all. Just reformatted the Windows drive.

Sorry.

All right, thank you.
Now could you please open a terminal and type the following commands:

su -l 
[noparse]zypper ar http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_11.4/ PTA[/noparse]
zypper refresh -r PTA
zypper in updategrub

Then, in the same terminal, type the following commands and post their output (please use [noparse]

...

[/noparse] tabs.)

cat /boot/grub/device.map
cat /boot/grub/menu.lst
fdisk -l
findgrub -m

  • and
cat  /etc/fstab

(we never know).

Not a big deal I can wait, but the information would still be interesting to have.

I am using grub which is installed into the Mbr of what used to be the Windows drive to boot openSUSE now. That drive is the mastered drive in the bios and no longer contains windows, but has been formatted to ext 4. The drive that openSUSE is on is slaved to that drive.

Does that answer your question about how I am booting openSUSE? I know maybe it sounds a bit confusing.

I don’t know how to use

...

tabs
…oh. Why didn’t it do that when you posted how? Let me try.

Posting in Code Tags - A Guide

It’s perfectly clear now.
I have to get out (lunch time here). If you follow the steps in post #16 (you need to install updategrub to get findgrub) and post the output of these commands

cat /boot/grub/device.map
cat /boot/grub/menu.lst
fdisk -l
findgrub -m
cat /etc/fstab

other knowledgeable members here will be able to tell you how to proceed exactly. It’s not complicated.

… I’m gone …