I have a system with several Red Hat installations on a single hard drive. I would like to automatically select the default installation to boot during runtime. The Red Hat way of doing this (which differs slightly from the Grub documentation) is to enter the grub shell and say
savedefault --stage2=<Stage 2 File> --default=<default>
which saves into the specified.
I use chainloading, so there are several grub.conf files on the disk. I only want to alter the stage2 file associated with the one tied to the MBR in /boot, not the individual ones associated with the installations themselves. In grub, if I say
find /boot/grub/stage2
or
find /grub/stage2
I get back valid lists of full pathnames to the partitions and files involved. In the former case, something like
(hd0,1)
(hd0,2)
and in the latter
(hd0,0)
It's the latter case I want to change. However, if I then say
root (hd0,0)
savedefault --stage2=/grub/stage2 --default=1
or variants like
savedefault --stage2=(hd0,0)/grub/stage2
savedefault --stage2=(hd0,0)/boot/grub/stage2
or similar, I get
Error 15: File not found
I vaguely suspect that I'm not mounting the partition properly, and that it perhaps read-only the way I'm doing things, but nothing I do seems to change the proper stage2 file. Note that if I just say
savedefault --stage2=/boot/grub/stage2 --default=1
or leave the '--stage2=...' option off entirely, the command succeeds, but changes the stage2 file on the partition the currently running OS was booted from - not the one associated with the MBR grub.conf which actually controls the initial boot.
What am I missing here?