[Bug 387601] New: automatic kexec on reboot
https://bugzilla.novell.com/show_bug.cgi?id=387601 Summary: automatic kexec on reboot Product: openSUSE 11.0 Version: Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: tiwai@novell.com ReportedBy: lnussel@novell.com QAContact: qa@suse.de CC: bwalle@novell.com Found By: --- What about adding the following code to the reboot/halt script so it automatically kexec's a new kernel if there is one loaded? --- /etc/init.d/halt.orig 2008-05-07 10:55:30.000000000 +0200 +++ /etc/init.d/halt 2008-05-07 09:21:39.000000000 +0200 @@ -235,5 +235,13 @@ # Set system console back to intial value test -n "$REDIRECT" -a -n "$CONSOLE" && setconsole $REDIRECT < $CONSOLE +if test "$command" = 'reboot' -a -x /sbin/kexec; then + read loaded < /sys/kernel/kexec_loaded + if test "$loaded" = 1; then + echo "Trying kexec..." + /sbin/kexec -e + echo "kexec failed, using normal reboot" + fi +fi # Now talk to kernel exec $command -d -f -n $opts -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=387601
User bwalle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c1
--- Comment #1 from Bernhard Walle
https://bugzilla.novell.com/show_bug.cgi?id=387601
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c2
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=387601
User lnussel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c3
--- Comment #3 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=387601
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c4
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=387601
User bwalle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c5
--- Comment #5 from Bernhard Walle
From the source code:
879 case OPT_FORCE: 880 do_load = 1; 881 do_shutdown = 0; 882 do_sync = 1; 883 do_ifdown = 1; 884 do_exec = 1; 885 break; and: 897 case OPT_EXEC: 898 do_load = 0; 899 do_shutdown = 0; 900 do_sync = 1; 901 do_ifdown = 1; 902 do_exec = 1; 903 break; So, 'exec' overwrites all values that 'force' set. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=387601
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c6
--- Comment #6 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=387601
User bwalle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c7
--- Comment #7 from Bernhard Walle
https://bugzilla.novell.com/show_bug.cgi?id=387601
User bwalle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c8
Bernhard Walle
https://bugzilla.novell.com/show_bug.cgi?id=387601
User bwalle@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c9
--- Comment #9 from Bernhard Walle
Then the manual page of kexec(8) is not correct. It should be mentioned that this option is a replacment for `--load & --exec'.
That's true. I made a patch to clarify the manpage and sent that upstream. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=387601
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=387601#c10
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com