From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Wm4hR-0004rQ-01 for mharc-grub-devel@gnu.org; Sun, 18 May 2014 13:16:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4hO-0004qp-NL for grub-devel@gnu.org; Sun, 18 May 2014 13:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wm4hN-0006pL-Dd for grub-devel@gnu.org; Sun, 18 May 2014 13:16:34 -0400 Received: from mail-qc0-x236.google.com ([2607:f8b0:400d:c01::236]:42139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4hN-0006o1-9c for grub-devel@gnu.org; Sun, 18 May 2014 13:16:33 -0400 Received: by mail-qc0-f182.google.com with SMTP id e16so7391175qcx.41 for ; Sun, 18 May 2014 10:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=l7lC7Cd1wB4FpCn3QVHMAWhfnG/sR/hUhUfHb2rqCDU=; b=aLxnjsO1kH9A9giOgaZa7bPR8JNyjL1z2gz9mIo+10IHvTk2J+30mSC7NgxbApz1o/ wqktf0+INfCrZYp3C9f5UJ9p4YNrD0Qib/7yc9hVpdQy8q0W6ZWGHp92zmshDIDwu8od yrAeugACKsXMNt0gWPBjhOBKGxMQYy8lirMifNCUggkVDI7bYu7Eo4ipAY9B62x3hwLn 3CAvQwuUb8xK15m2RU9rMiMFbI4R0hJRltUTJP8AQ9TqRnkwWPiNCUJ/QG72o7GVYH0X uGlL3mBOQrup6l3PXuX7cmfpOYX+gyc4t+y6eTMnQxYOCC+gjxzU0iJw7T3iVvSuumEQ bO4g== X-Received: by 10.224.4.66 with SMTP id 2mr40615238qaq.58.1400433392522; Sun, 18 May 2014 10:16:32 -0700 (PDT) Received: from ?IPv6:2601:6:2a80:4ba:4557:7005:8089:a8ef? ([2601:6:2a80:4ba:4557:7005:8089:a8ef]) by mx.google.com with ESMTPSA id d110sm9231449qge.17.2014.05.18.10.16.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 May 2014 10:16:32 -0700 (PDT) Message-ID: <5378EAEC.8050605@gmail.com> Date: Sun, 18 May 2014 13:16:28 -0400 From: SevenBits User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: How to exit from linux kernel and return to then grub? References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 17:16:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/18/2014 01:33 AM, Z C wrote: > If I boot into a linux kernel using a grub command like "linux > /vmlinuz; inirtd /initrd; boot", how do I shutdown linux itself > (but do not power off or reboot the computer hardware) and return > back to the grub directly? You can't. > > What I meant is something equivalent to the "exit" command in most > shells: If you are within one shell and you enter another shell, > then if you want to quit the second shell and return back to the > first shell, just simply type exit. All env variables and commands > you previous typed in the first shell are completely intact. > > Suppose I am now in the grub shell, and then I boot into a tiny > linux kernel, say, a busybox shell, then what can I do to exit the > second shell (i.e. busybox shell) and return to the first shell > (i.e. grub shell)? Of course I can enter the grub shell again by > simply rebooting the hardware, but this is not what I want. When Linux boots, the kernel takes over the management of the computer completely. The boot loader is not preserved in memory. Why would it be? The function of the boot loader really is to just boot up the computer and then get the heck out. There are many, many obstacles to implementing something like this. Not to mention the fact that in order to return to GRUB, you would need to set the processor to return from protected mode into real mode. All modern processors can do from real mode to protected mode (which you must do to enabled 32 bit processing). So, no. It isn't possible. > > > > _______________________________________________ Grub-devel mailing > list Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTeOrsAAoJEFbRvtGxmFPEkRcIAIXPLokSPvjmBW/1xCVdsOqn 3AP7ZP/IQwNsFvvXUWczpjGDZAZIWSykHdB0zTl7xIYeT9cwEqzgVcZxNnV7riUr lAKc8viq1ZpZpwR+9k3KOFXzeL63tpNOi2JYaRxnsVHuk/s7ASoDD80KfO+LoqYd BoJ5XL/yxhYy7EoKkHAElgSQ68RFg3pdix2q4tjN205WvJoP1nfakITyhdiifxLW Dm7l6LFUv2wn7HWpvJw722UHz6M5/wenXNLZwHejp/561gW+hiKzhT5pTs//p4y/ NOqFrY9W+Q5z8PyIH0AYFDCDmg6Pi04dezEoEGr4c4SFs2N9weMRlVnJpqN48pc= =rftU -----END PGP SIGNATURE-----