Я недавно прочитал немного о boot.ini, и я немного запутался. Из того, что я понял, boot.ini для GRUB работает как menu.lst (или любой другой файл, который нужен GRUB). Итак, если boot.ini до загрузки компьютера в Windows (или любую другую операционную систему), может ли он использоваться вместо GRUB? Если так, то boot.ini - это не «вещь Windows», не так ли? (Так как он может использоваться полностью независимо от Windows). Может быть, я что-то упустил, и то, что я сказал здесь, полная чушь Может кто-то объяснить это мне? Спасибо!
Я думаю, что загрузчик Windows, который читает boot.ini, всегда устанавливается в MBR, тогда как GRUB может быть установлен в MBR или загрузочном секторе в любом основном разделе. (Ну, я не уверен ...)
Xiè Jìléi 12 лет назад
0
@ XièJìléi Вы действительно можете установить GRUB в раздел, но у вас все еще есть загрузчик на MBR для загрузки GRUB. Так что нет особого смысла.
new123456 12 лет назад
0
3 ответа на вопрос
3
Bob
The file boot.ini is part of NTLDR, the bootloader used in Windows NT up to XP and Sever 2003 (i.e. up to NT kernel major version 5). It's very much a 'Windows-thing' in that it is distributed with Windows and designed to be used with Windows. It does, however, have the capability to chainload GRUB and any other bootloader.
More recent versions of Windows (Vista, 7) use BOOTMGR, which relies on a BCD (Boot Configuration Data) store rather than the simple boot.ini text file. It can again be used to chainload GRUB or other bootloaders. In fact, programs such as EasyBCD and Visual BCD Editor provide a very simple process to add an entry for GRUB.
Chainloading can be basically described as the bootloader replacing itself in memory with a different one. If a bootloader supports chainloading, you can basically direct it to load any file it can read (on a FAT/NTFS file system in the case of Windows' bootloaders) and execute it as if the file was the original bootloader. In theory you can actually form a loop, where a bootloader loads another that loads the original, and so on...
There's a very nice description of the startup process at the Wikipedia article here.
1
Julian Knight
The Windows boot loader is installed into the Master Boot Record of the first bootable drive by default.
The boot process uses the boot.ini file to configure the options to present when booting.
The Windows boot loader is positively simplistic when compared to GRUB.
Boot.ini does bear a passing resemblance to menu.lst but the similarity is more convergent evolution rather than anything else.
It is possible, though not totally trivial, to get the Windows boot loader to trigger another OS. To acheieve this, you need a copy of the boot records for the other OS's boot drive, you can then add a reference to that in boot.ini that will allow that boot record to be executed to load the other OS. See the last entry in this discussion for more details.
Even GRUB doesn't really attempt to actually boot Windows, it simply hands off (chains) to the Windows boot loader.
Ваше утверждение о невозможности загрузки какой-либо другой операционной системы не является точным на 100%. Вы можете загрузить другую операционную систему. Я должен понизить ответ за неправильность в этом отношении.
Ramhound 12 лет назад
0
Хм, возможно, сурово! Я отредактирую, чтобы уточнить. Готово. Прошло много времени с тех пор, как я смотрел на это, очевидно, старое серое вещество подымалось.
Julian Knight 12 лет назад
0
1
Hennes
As far as I understand it booting for a IBM compatible PC is as follows:
The computer runs the Power-On Self Test.
The computer BIOS locates the boot device and loads and runs the MBR (Master Boot Record). Modern systems might have EUFI rather than BIOS. UEFI can load both MBR and GPT drives. I will ignore those for now.
The MBR contains the partition table for the disk. One of the partitions will be marked as 'active'. The BIOS loads the boot sector from this the active partition into memory and then executes it.
If this was a older windows boot sector then the program in the boot sector will start and initialize the NTLDR file, which is the operating system loader.
NTLDR uses boot.ini to present options
You can point the NT loader (ntldr) to other installation. E.g. if your old boot.ini looks like this:
[boot loader] timeout=10 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos C:\="MS-DOS"
then you can add a line with C:\bootsect.lnx="Boot Linux and put the linux bootsector in a file c:\bootsect.lnx. Then you can use the same menu to select between windows boot options and linux. Selecting the linux boot option will trigger whatever commands are in that file, which might a GNU/Linux bootloader. That would present you with a second (and possibly unwanted) menu to select from.
This means that nltdr does not really boot anything but windows, but you can let it hand over to boot process to another boot loader.