YAGQ

Sorry, but i have yet another grub question.

GRUB scares the heck out of me, every time I have messed with it in the past I have had to spend ages trying to fix it, sometimes with success and other times giving up and reinstalling.

I have a SUSE installation on /dev/sda2 (root) & /dev/sda3 (home) with swap on /dev/sda1

I have another SUSE install on /dev/sda5 (root) & /dev/sda6 (home) with swap on /dev/sda1

(Why is a long story…)

Currently when I start up the system goes to the /dev/sda2 install and the boot menu there defaults to the install on /dev/sda5

I want to change that (in the absolutely safest way possible) so that on startup the system will go to the /dev/sda5 install where a menu will default to that install with an option to go to the /dev/sda2 install.

How can I accomplish this without ageing 10 years due to stress and fear?

(Should I have a separate /boot partition that can deal with one menu.lst for all future tinkering? If so what do I need to do once I have created a partition? etcetera)

Thanks,
Simon

sjewins wrote:
> Sorry, but i have yet another grub question.
>
> GRUB scares the heck out of me, every time I have messed with it in the
> past I have had to spend ages trying to fix it, sometimes with success
> and other times giving up and reinstalling.
>
> I have a SUSE installation on /dev/sda2 (root) & /dev/sda3 (home) with
> swap on /dev/sda1
>
> I have another SUSE install on /dev/sda5 (root) & /dev/sda6 (home) with
> swap on /dev/sda1
>
> (Why is a long story…)
>
> Currently when I start up the system goes to the /dev/sda2 install and
> the boot menu there defaults to the install on /dev/sda5
>
> I want to change that (in the absolutely safest way possible) so that
> on startup the system will go to the /dev/sda5 install where a menu will
> default to that install with an option to go to the /dev/sda2 install.
>
> How can I accomplish this without ageing 10 years due to stress and
> fear?
>
> (Should I have a separate /boot partition that can deal with one
> menu.lst for all future tinkering? If so what do I need to do once I
> have created a partition? etcetera)

Post /boot/grub/menu.lst, and one of the gurus here will show you what
to do.

Larry

No, you don’t need a separate /boot partition. But it sounds like grub stage1 in the MBR is finding its stage2 in sda2 not sda5. You need to get into sda5 and install grub to the MBR from there. You can do that from YaST. In YaST you can also ask it to recommend a new menu.lst configuration (it’s under the “Other” button, bottom right) and then check what the new menu.lst will look like under “Edit Configuration Files”, also under “Other”.

It will recommend to chainload to sda2 if you have installed grub in the sda2 boot sector. In that case, the menu.lst stanza is:

title sda2-blah-blah
root (hd0,1)
chainloader +1

If there is no installed boot sector, Yast will recommend a direct booting stanza, something like this:


title sda2-blah-blah
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.16-0.1-default root=/dev/sda2
initrd /boot/initrd-2.6.25.16-0.1-default

The kernel line of course will be longer, with vga= etc. I suggest you change the kernel filename to just “vmlinuz” and the initrd filename to just “initrd”. These are symlinks in /boot that always point to the current kernel. That way, when you update the kernel in sda2 you won’t have to modify menu.lst in sda5.

Make sense?

By the way, everything above can be done from the command line in sda5 by hand if you prefer that. Sometimes that provides more granular control and precise feedback of what is being done.

It makes sense. Thanks. I will try that when I get home later.

Thanks, again,
Simon