Hi !
I am posting this again, since I still have the problem and have not been able to resolve this. Please, take a look and comment if you can. Thank you !
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 ?
I have done the RTFM / info thing.
Your help is much appreciated, Matthias
Hi,
On Mon, Aug 3, 2009 at 13:44, Matthias Blankenhausmatthiasblankenhaus@yahoo.com wrote:
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 :(
I believe RedHat patches this feature out of Grub, at least that was what one of the bugs in RedHat's bugzilla was complaining about (BTW, that bug was posted in this list a couple of days ago, probably in the same thread you started). However, I did not confirm that statement, it might be wrong. Inspecting the grub SRPM and the patches it applies might confirm that.
The bug said something about RedHat adding a custom patch to achieve the same effect, the patch would store the "default" and/or "fallback" boot option inside the stage2 file. Though, I did not find any references to that mechanism or any documentation of it. You might have to look into the source and patches to see how that is done...
All I can say at this point is "Read the Source, Luke!"
HTH, Filipe
On Mon, Aug 3, 2009 at 13:54, Filipe Brandenburgerfilbranden@gmail.com wrote:
All I can say at this point is "Read the Source, Luke!"
I mean: "Use the Source, Luke!"
Was thinking of "RTFS" when I wrote it before...
Filipe
--- On Mon, 8/3/09, Filipe Brandenburger filbranden@gmail.com wrote:
wrote:
All I can say at this point is "Read the Source,
Luke!"
I mean: "Use the Source, Luke!"
Was thinking of "RTFS" when I wrote it before...
This is a new one :)
However, I actually figured it out myself. The problem is that RedHat and all derived distros (like CentOS) has a slimmed down version of the 0.97 grub gnu version. For some reason they took out the fallback support. Unfortunately, they did not reflect that in the man / info pages. Thus, a user is mislead by the docu. If you want the fallback feature, then you need to download the Gnu 0.97 grub version and compile it yourself. You will then end up. among other things, with the infamous grub-set-default script. This script creates a file called 'default' which stores the boot label as a number, e.g. from 0..(n-1).
BTW, a new grub2 is on its way and it will replace the current grub ...
Thanx, Matthias
Filipe _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mon, Aug 3, 2009 at 17:06, Matthias Blankenhausmatthiasblankenhaus@yahoo.com wrote:
BTW, a new grub2 is on its way and it will replace the current grub ...
I think it's been "in development" for about 5 years now, and I still haven't seen anyone use it yet... Vaporware??? :-)
Filipe