From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Wm4oJ-0006AM-Df for mharc-grub-devel@gnu.org; Sun, 18 May 2014 13:23:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4oG-00069T-R1 for grub-devel@gnu.org; Sun, 18 May 2014 13:23:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wm4oF-0000VM-Ly for grub-devel@gnu.org; Sun, 18 May 2014 13:23:40 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:46463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm4oF-0000VI-Hu for grub-devel@gnu.org; Sun, 18 May 2014 13:23:39 -0400 Received: by mail-qg0-f43.google.com with SMTP id 63so7332623qgz.2 for ; Sun, 18 May 2014 10:23:39 -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=LM8tfa4JCNQvjTbI4oJ0uvRhDcB8qNw+0mWDV2J5wGw=; b=W30AxnTTaHDH75R6vIk3oSVaf4yArKcbYda4UO9vVnER49GFVYsPQs9RTVTh0AzgcO 8bHxbrxjO/aru3U7Xx1qwhbC9GxuUvWxwskW+CQOrvocwejNb5vS2DlntoFPP9205ODH hWUF47cQz85xZh2LRZA/iL8Cgfl9WVt6Ic0MEw6qVSPSeeFiRxE0osQy+izLKyGH7eKQ U0Nr7vDHPrUk0JOCD8eO9+mQs+tqumTMOdJ4GQrL45iSJ6FZRnvMN12jrlm6YsF7F0py Gqsn8b/lRGNb436cHYcF0Nnm0QdJyZyLiisrA39VXia1hlaWzM/KVhLEzxRJBDGlboh2 hs1A== X-Received: by 10.224.16.199 with SMTP id p7mr41530111qaa.76.1400433819206; Sun, 18 May 2014 10:23:39 -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 73sm9244136qgw.5.2014.05.18.10.23.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 May 2014 10:23:38 -0700 (PDT) Message-ID: <5378EC89.40201@gmail.com> Date: Sun, 18 May 2014 13:23:21 -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:c04::22b 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:23:42 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Actually, a correction to what I just said. A processor can return from protected mode to real mode. Read more here: https://en.wikipedia.org/wiki/Protected_mode#Entering_and_exiting_protected_mode I don't know if GRUB supports this (I would assume not) but generally speaking it is still not possible to do what you want because the Linux kernel as far as I know does not have the functionality that would be required. If you want to try and do this, go ahead and attempt it, but the roadblocks will be so large that it probably is not worth trying, and just simply rebooting the machine is the best way to get to GRUB. If you tell us what are _trying_ to do, i.e what you need this functionality for, perhaps we can suggest an alternative way to achieve what you need. - -- SevenBits P.S: Since this topic is not about the development of GRUB, it probably doesn't belong in this list. Please consider posting to grub-users instead. 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? > > 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. > > > > _______________________________________________ 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/ iQEcBAEBAgAGBQJTeOyJAAoJEFbRvtGxmFPEykoH/3cw/hYn+kdJLKrJeTh9SgJy +2z8KKbPgX5H71NqUUAN7bU5yE+AyAvVh2F8K9PAk1HxVFu3edGD6Wmr4DRnwY6m i9nS+gnq+5enS/9xj7LHtvuEm/6xbYJkI54i9U6EGYBR6gJneRkd2yoJqmJsKUum eh7TIjTmrXPW6Kd2ZcoO7GyR/hjR+GWNDQRJeaVmj2wlZM00et+ei3AXzpvOzJ3l 9IOd3gkhkkt77DxYFPkxnJk7HtsHl1rnvqW4ct07ByzlFgCsFo8/ddbgEE6l6Zlm U1OvndApeofKoznXtNmrMpquHhqnTE9mr8asIua5962s9HdBkxPtHU+4a0VvBYw= =QTsj -----END PGP SIGNATURE-----