From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F375C1389F5 for ; Mon, 17 Nov 2014 03:25:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 62120E0DD0; Mon, 17 Nov 2014 03:25:36 +0000 (UTC) Received: from mail.wraeth.id.au (wraeth.id.au [106.187.101.125]) by pigeon.gentoo.org (Postfix) with ESMTP id ABF1BE0925 for ; Mon, 17 Nov 2014 03:25:34 +0000 (UTC) Received: from localhost (mail.wraeth.id.au [127.0.0.1]) by mail.wraeth.id.au (Postfix) with ESMTP id 9720B14004B for ; Mon, 17 Nov 2014 14:28:20 +1100 (AEDT) X-Virus-Scanned: amavisd-new at wraeth.id.au Received: from mail.wraeth.id.au ([127.0.0.1]) by localhost (mail.wraeth.id.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TBmgxmGU-gmX for ; Mon, 17 Nov 2014 14:28:19 +1100 (AEDT) Received: from cerberus.civica.com.au (watch.civica.com.au [203.56.2.254]) by mail.wraeth.id.au (Postfix) with ESMTPSA id D3DAF140034 for ; Mon, 17 Nov 2014 14:28:18 +1100 (AEDT) Date: Mon, 17 Nov 2014 14:25:22 +1100 From: wraeth To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] kexec Message-ID: <20141117032522.GE26846@cerberus.civica.com.au> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <546954DC.8050402@thegeezer.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <546954DC.8050402@thegeezer.net> User-Agent: Mutt/1.5.22 (2013-10-16) X-Archives-Salt: dce5d83f-b037-4602-8223-e30d0b68363b X-Archives-Hash: 8199d045a25dd6cd1305e6fecebb28f8 --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2014 at 01:52:28AM +0000, thegeezer wrote: > kexec is a great little utility. when you run "/etc/init.d/kexec start"= =20 > it creates references in the existing kernel for a soft reboot into a=20 > new kernel. you can then at a time of your choosing run "reboot" and=20 > the system will appear to go through a clean shutdown cycle, but instead= =20 > of triggering the power cycle, it will access the referenced kernel and= =20 > initram and load them into memory as though we are just coming from the= =20 > grub boot menu. the kernel image and initramfs must be visible at the=20 > time you choose to reboot. I've heard a little about this and have been curious to try it, but haven't had the opportunity to dig into it yet. > using the tools manally is possible too -- /etc/init.d/kexec automounts= =20 > boot and searches for the bits to use. you can do it manually by /etc/init.d/kexec - is this a SysV/OpenRC-based init script? How does it play with systemd, do you know? > ## load a kernel and initram > kexec -l /boot/vmlinux --append=3Ddolvm, root=3D/dev/vg/root= =20 > --initrd=3D/boot/initrd >=20 > ## reboot hard and fast into new kernel (warning does not go through=20 > shutdown so mounted fs acts as though you hit the reset button) > kexec -e Would I be correct in guessing that this is dependant on sys-apps/kexec-tools being installed and CONFIG_KEXEC being enabled in the kernel? And, with CONFIG_KEXEC, is that required for the old kernel, new kernel or both? Also, how would one go about manually using kexec while still adhearing to a clean shutdown (going down through init, rather than just "reset" into the new kernel)? > hope this has been interesting! It has, and having read this I'm going to try and play around with it in the next couple of days. Thanks for the info on it. Cheers. --=20 wraeth GnuPG Key: B2D9F759 --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlRpaqIACgkQXcRKerLZ91kXWwD/RzX0DEWa81P+Yp05POuFvGMD S00yk4jmbANL9/GO4ukA/0y7E0Ty7rBxXuiftmqKL3N4DJB439tB2ta8i6XSzAT2 =p5e5 -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--