Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80220 - kexec - reboot.sh to load new kernel with kexec instead of reboot
Summary: kexec - reboot.sh to load new kernel with kexec instead of reboot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-31 08:54 UTC by Stefan Schweizer (RETIRED)
Modified: 2005-11-20 04:44 UTC (History)
4 users (show)

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


Attachments
reboot.sh (reboot.sh,169 bytes, text/plain)
2005-01-31 08:54 UTC, Stefan Schweizer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schweizer (RETIRED) gentoo-dev 2005-01-31 08:54:04 UTC
Hi,

it would be nice if you could change the reboot.sh to the following:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

/sbin/kexec -e 2>/dev/null || /sbin/reboot -idp
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-31 08:54:53 UTC
Created attachment 50052 [details]
reboot.sh
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-31 10:46:19 UTC
ok, actually its better to use:

/sbin/reboot -ikdp

in reboot.sh together with a sysvinit patch from 
http://www.gc-linux.org/down/isobel/kexec/sysvinit/sysvinit-2.86-kexec.patch
Comment 3 Joshua Kinard gentoo-dev 2005-02-01 20:53:57 UTC
How does this affect non-x86 systems where kexec hasn't been implemented?

If this is adopted, it might be worth hiding the patch behind a x86 USE or kexec USE to keep the logic x86-specific (since, AFAIK, kexec was only done for x86 and not ported to other archs.)
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2005-02-01 21:51:55 UTC
afaik, kexec was ported to ppc, but as I am lacking the necessary hardware I have no chance to test it, sorry :(

And yes, I think it should be if useq x86; then change reboot.sh; fi

At least as long as no one has tested it on ppc :)
Comment 5 SpanKY gentoo-dev 2005-05-22 00:42:31 UTC
the sysvinit patch should be safe for all arches

now the question is, how do we incorporate this feature into baselayout ? 
making reboot always execute kexec certainly is not desired in case user
actually *wants* to reboot into the bios ...

what if we change the option that reboot uses from '-k' to '-K' ... that way we
could add '-K' to shutdown too ... then we'd just have to figure out how to have
shutdown communicate with reboot.sh ... could cheat with something like having
shutdown touch /.reboot-kexec or /dev/.reboot-kexec, but that'd if / and /dev
were readonly :/
Comment 6 Daniel Webert 2005-09-13 15:49:19 UTC
any new ideas? (sorry i'm not suffient creative for this kind of things ...)
.13 is here, .14 is comming and kexec is also in cvs ...
Comment 7 SpanKY gentoo-dev 2005-11-20 04:44:18 UTC
reboot.sh runs `reboot -idpk` now in svn