Let's try this again :)
I am running CentOS 5 (core pkgs) / x86_64 using grub 0.97 and I am trying to configure a fallback between two partitions on my local disk, each installed with a CentOS image. The idea is to be able to install a new test OS image and fall back in case of a problem to the default image. This is a great grub feature ! Except it does not work for me :(
grub.conf: #----------------------------------------------- default saved timeout=5 fallback 1
title NEW OS root (hd0,0) kernel /boot/vmlinuz-new root=/dev/sda1 panic=5 initrd /boot/initrd-new.img savedefault fallback
title DEFAULT OS root (hd0,1) kernel /boot/vmlinuz-default root=/dev/sda2 initrd /boot/initrd-default.img savedefault #-----------------------------------------------
Grub is installed on /dev/sda1, but not on /dev/sda2. /dev/sda1 is the primary boot partition. Both partitions are formatted with ext3.
The problem is that the fallback does not work for me. For instance, if I specify on purpose a wrong root device with the NEW OS, e.g. root=/dev/sda3, then the kernel panics and reboots properly after 5 sec. However, grub then attempts to boot the NEW OS all over again. The same is true when I fully boot NEW OS with the right root device and then panic the kernel on purpose.
Now, I have read somewhere that grub requires a default file to get the savedefault feature working. However, I could neither find the 'savedefault' command nor the grub default file under /boot/grub or anywhere else. One more thing, when I choose the boot title manually then grub seems to remember my last choice. In other words, grub is preserving my last choice from a previous boot.
Am I doing something wrong ? Do I need to install something in addition to grub 0.97 ?
Your help is much appreciated, Matthias
--- On Wed, 7/29/09, Matthias Blankenhaus matthiasblankenhaus@yahoo.com wrote:
From: Matthias Blankenhaus matthiasblankenhaus@yahoo.com Subject: Grub fallback problem To: centos@centos.org Date: Wednesday, July 29, 2009, 11:19 AM Hi !
I am running CentOS 5 using grub 0.97
From: Matthias Blankenhaus matthiasblankenhaus@yahoo.com
The problem is that the fallback does not work for me. For instance, if I specify on purpose a wrong root device with the NEW OS, e.g. root=/dev/sda3, then the kernel panics and reboots properly after 5 sec. However, grub then attempts to boot the NEW OS all over again. The same is true when I fully boot NEW OS with the right root device and then panic the kernel on purpose. Now, I have read somewhere that grub requires a default file to get the savedefault feature working. However, I could neither find the 'savedefault' command nor the grub default file under /boot/grub or anywhere else. One more thing, when I choose the boot title manually then grub seems to remember my last choice. In other words, grub is preserving my last choice from a previous boot.
Not sure if you already read this: http://www.gnu.org/software/grub/manual/html_node/Booting-fallback-systems.h...
JD
--- On Thu, 7/30/09, John Doe jdmls@yahoo.com wrote:
From: John Doe jdmls@yahoo.com Subject: Re: [CentOS] Grub fallback problem To: "CentOS mailing list" centos@centos.org Date: Thursday, July 30, 2009, 3:53 AM From: Matthias Blankenhaus matthiasblankenhaus@yahoo.com
The problem is that the fallback does not work for
me. For instance, if I
specify on purpose a wrong root device with the NEW
OS, e.g. root=/dev/sda3,
then the kernel panics and reboots properly after 5
sec. However, grub then
attempts to boot the NEW OS all over again. The
same is true when I fully boot
NEW OS with the right root device and then panic the
kernel on purpose.
Now, I have read somewhere that grub requires a
default file to get
the savedefault feature working. However, I
could neither find the
'savedefault' command nor the grub default file under
/boot/grub or
anywhere else. One more thing, when I choose the
boot title manually
then grub seems to remember my last choice. In
other words, grub is
preserving my last choice from a previous boot.
Not sure if you already read this: http://www.gnu.org/software/grub/manual/html_node/Booting-fallback-systems.h...
John, thanx for your reply.
Yes, I did read this and modified my grub.conf accordingly. However, the link you've sent me contains a reference to grub-set-default, which seems to be no longer part of the grub rpm. This is one part of the problem. The second one, as mentioned above, is that grub seems not to preserve the fallback state across reboots.
Still puzzled, Matthias
JD
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
--- On Thu, 7/30/09, John Doe jdmls@yahoo.com wrote:
Not sure if you already read this: http://www.gnu.org/software/grub/manual/html_node/Booting-fallback-systems.h...
Seems like this has been a well known problem for quite some time at RHEL: https://bugzilla.redhat.com/show_bug.cgi?id=212649
So, how do people these days implement a failover to an alternative OS image if the booting OS panics ?
Thanx, Matthias
Matthias Blankenhaus wrote on Wed, 29 Jul 2009 11:47:22 -0700 (PDT):
Now, I have read somewhere that grub requires a default file to get the savedefault feature working. However, I could neither find the 'savedefault' command nor the grub default file under /boot/grub or anywhere else. One more thing, when I choose the boot title manually then grub seems to remember my last choice. In other words, grub is preserving my last choice from a previous boot.
The "savedefault" script is grub-set-default and you can find it with a locate. Compare the link that John Doe posted. I think I couldn't make it work, anyway, when I tried this last year. You wrote me a private mail that I posted about this problem last year. Can you give a message-id or a URL where it's archived, so I can refresh my memory? I can tell you definitely that I gave up on this last year and didn't ever revisit this problem.
Kai