grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: SevenBits <sevenbitstech@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: How to exit from linux kernel and return to then grub?
Date: Sun, 18 May 2014 13:23:21 -0400	[thread overview]
Message-ID: <5378EC89.40201@gmail.com> (raw)
In-Reply-To: <CAD=SU=eAHbJ5LP9N7i8PmhYp-PZkkoEr5L1MfPsj2gJNLViwkA@mail.gmail.com>

-----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-----


  parent reply	other threads:[~2014-05-18 17:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18  5:33 How to exit from linux kernel and return to then grub? Z C
2014-05-18 14:43 ` Lennart Sorensen
2014-05-18 17:16 ` SevenBits
2014-05-18 17:46   ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-05-18 17:52     ` SevenBits
2014-05-18 17:23 ` SevenBits [this message]
2014-05-18 17:59 ` Chris Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5378EC89.40201@gmail.com \
    --to=sevenbitstech@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).