Issue with grub failback

Latest response

Hallo,

I have a primary and a backup boot partition,

I edited the /etc/grub.conf with the failback option and I want grub to mount the backup boot partition if primary one fails, automatically.

So, after a reboot and a primary boot partition failure, I hit the error 17 - cannot mount selected partition and the system hangs

with "press any key..." message, so manual intervention needed .

Is there a way to bypass the "press any key message" ?

Thanks in advice,
Vincenzo

Responses

At first look, I could say that the file "/etc/grub.conf" is a symbolic link to "/boot/grub/grub.conf" file, it could be a good idea to check if grub.conf file also modified accordingly.

Yes, "/boot/grub/grub.conf" got modified accordingly. Infact the "default saved" option works fine. The issue is the "press any key.." that needs manual intervention, while I want an automatic failback to next good bootable partition.

Based on the file we assume you are using RHEL6. Files are explained here Verifying the Boot Loader.

The grub is configured fine with failback option, but failback doesn't work if the boot partition fails, as it should skip to the good bootable partition, instead of getting stuck on "press any key.." I wonder if there is a way to bypass that blocking message.

Yes, if this RHEL6.x then you might be missing "fallback" parameter in grub.conf. Refer this article Does GRUB support fallback mechanism?

Thanks, I did exactly as the article you mentioned, but the result is no autofailback , as the note says: "In case, there's an issue while booting from the first disk, then GRUB will automatically start booting from the second entry." On the contrary, there is a the following message, and i can't set a timeout to let the grub go on next entry:

"Error 17 cannot mount selected partition
Press any key to continue ..."

That's means that failback isn't really automatic.

I tested by adding "fallback" parameter to grub.conf with 3 boot stanzas over there, so it works as expected, i mean it automatically boots from second kernel. So, in my case, there are three kernels, I added "fallback 1" under defaults in grub.conf, after this I edited the kernel line of first stanza and made mistake so that while reboot it would automatically boots from second kernel, yes, this works. Though an error pops up, however, immediately it boots from second kernel.

After this I deliberately made an error on the second kernel line after which i received the error and now it halts with message "press any key to continue....", so, I modified fallback line as "fallback 1 2". Tested this and now, it auto boots from third kernel when first and second kernel booting fails. I hope this is not the case over there for you..

Btw, which redhat release is this ? I hope this is not RHEL5.x ?

Thanks for testing it, my release is a RHES 6.2.

Do you have tried to put wrong partition in "root" option? I mean, try using a wrong "root" option pointing to an not existent (=failed) device. For example:

title  PRIMARY
        root (hd1,0)   <--- missing disk
        kernel /vmlinuz-2.6.32-642.4.2.el6.x86_64 ro root=/dev/mapper/vg_cnoradb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=it rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg_cnoradb02/lv_swap crashkernel=auto rd_LVM_LV=vg_cnoradb02/lv_root rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-642.4.2.el6.x86_64.img

title BACKUP
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_root-lv_root rd_NO_LUKS rd_LVM_LV=vg_root/lv_root LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=it-ibm rd_LVM_LV=lv_swap/lv_swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM
        initrd /initramfs-2.6.32-220.el6.x86_64.img
        savedefault

Besides if a put a wrong initramfs file, i get "Error 15 file not found" and press any key message but no failback...

Sorry, I got the issue: I mispelled "fallback" option in "failback", so it didn't work. Fixed that, now it is all OK.

Thanks for support, Enzo

Nice you identified the mistake early, otherwise, you'd have been running behind the issue..

Yes, that was a bit embarassing, I got that grub falls back but doesn't fails back :)

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.