简体   繁体   English

将内核与GRUB或其他程序集引导加载程序连接

[英]Connecting a Kernel with GRUB or some other assembly bootloader

I have been following this kernel ( http://www.cs.vu.nl/~herbertb/misc/writingkernels.txt ) and have got down to the part where it is linked with grub. 我一直在关注该内核( http://www.cs.vu.nl/~herbertb/misc/writingkernels.txt ),并深入到了与grub链接的部分。 However, I do not have stage1 and stage2 in /boot/grub/ (Linux mint x64). 但是,我在/ boot / grub /(Linux mint x64)中没有stage1和stage2。 Also when I write "mpartition -I c:" I get the error: "mpartition: init: open: No such file or directory". 同样,当我写“ mpartition -I c:”时,我得到了错误:“ mpartition:init:open:没有这样的文件或目录”。 So it would be nice to get a link to stage1 and stage2 with all the necessary files or some code to an assembly boot loader that would load this kernel. 因此,获得具有所有必要文件的stage1和stage2链接或到将加载此内核的程序集引导加载程序的一些代码,将是很好的。 Extra note: I used 'elf64' rather than 'elf' because of my system. 附加说明:由于系统原因,我使用了“ elf64”而不是“ elf”。

The instructions you refer to apply to GRUB v1, now referred to as GRUB legacy. 您引用的说明适用于GRUB v1,现在称为GRUB旧版。 Current GRUB is the project that used to be called GRUB2. 当前的GRUB是以前称为GRUB2的项目。 They are pretty much completely different - so your instructions are no longer valid. 它们几乎完全不同-因此您的说明不再有效。

That said, current GRUB is a lot more flexible than GRUB legacy - perhaps you could simply use its chainloader functionality to load the kernel.bin . 也就是说,当前的GRUB比GRUB遗留的要灵活得多-也许您可以简单地使用其chainloader功能来加载kernel.bin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM