Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169452 - Need to reboot on any fail
Summary: Need to reboot on any fail
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 13:52 UTC by Sergey
Modified: 2007-03-12 02:44 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2007-03-05 13:52:34 UTC
I want to upgrade kernel remotely. I wrote fallback configuration for grub, example "fallback 1". I call grub-set-default 0 to set default new kernel. I add new line to grub item: "savedefault fallback". Is it possible make so, if root device fails, initrd will reboot computer. And it boots not new, but fallback kernel.


Reproducible: Always

Steps to Reproduce:
1. add menu item with root=/dev/not/exists and savedefault fallback
2. reboot computer
3. 

Actual Results:  
boot new item and prompts shell or root I

Expected Results:  
I want just reboot with fallback configuration.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2007-03-09 18:04:27 UTC
Feel free to submit a patch for that.  The machine *should* reboot on a kernel panic after 180 seconds, which is the kernel default.  If it doesn't, then we might need to poke the kernel to do it.

Also, you can change the value on the kernel command line.

panic=10 changes the timeout to 10 seconds.  There's really no need for genkernel itself to do anything.  I'm not really sure how to get grub to boot an alternate entry, so that's kinda out of the scope of genkernel.
Comment 2 Sergey 2007-03-12 02:44:42 UTC
Machine reboots at kernel panic. Here is not kernel panic, here is prompt of root device or shell.
My grub config (it woks fine, I run grub-set-default and reboot):

default saved
fallback 1
timeout 5

# Genkernel generated entry, see GRUB documentation for details
title=Gentoo Linux (2.6.20-gentoo-r1.1)
        root (hd0,0)
        kernel /kernel-genkernel-x86_64-2.6.20-gentoo-r1.1 root=/dev/ram0 init=/linuxrc real_root=/dev/cluster/system dolvm2
        initrd /initramfs-genkernel-x86_64-2.6.20-gentoo-r1.1   savedefault fallback


# Genkernel generated entry, see GRUB documentation for details
title=Gentoo Linux (2.6.20-gentoo.1)
        root (hd0,0)
        kernel /kernel-genkernel-x86_64-2.6.20-gentoo.1 root=/dev/ram0 init=/linuxrc real_root=/dev/cluster/system dolvm2
        initrd /initramfs-genkernel-x86_64-2.6.20-gentoo.1