Pergunta

I learn that when computer starts it is in real mode.
And kernel is responsible for switching mode from real to protected.
Ok , my question is Grub boot loader runs in real mode or in protected mode ?

Foi útil?

Solução

AFAIK, Grub starts in real mode like any other software loaded at boot. It switches to protected mode for its run time (detecting HD, displaying menus etc.) and switches back into real mode before loading and running OS such as Linux that do not support multiboot protocol.

Outras dicas

See http://duartes.org/gustavo/blog/post/kernel-boot-process for a detailed answer, but basically Grub does not switch to protected mode when running Linux. It loads the real-mode part of the kernel in low memory and let it do the switch itself (as required per the Linux Boot Protocol, http://lxr.linux.no/#linux+v2.6.25.6/Documentation/i386/boot.txt)

However, Grub also supports the Multiboot Specification, which starts the loaded OS in protected mode. This is done for non-Linux kernels, like modern homebrew OSes for which the makers do not want to bother with the hassle of switching to protected mode.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top