Page 3 of 3
Re: Grub Error 13 with pe format kernel
Posted: Thu Nov 26, 2009 8:39 am
by gedd
Solar wrote:What does mbchk say about your kernel binary?
Nothing !
mbchk seems not be available on cygwin
Solar wrote:Apart from that, I found no references that it would indeed be possible to load a PE kernel using GRUB. It mentions ELF and the various a.out formats all over the place, but every article I googled combining GRUB and "PE format" recommends going the cross-compiler / ELF format way.
I have already test an elf kernel with grub with a cross compiler. It works fine !
Solar wrote:That doesn't mean it can't be done, it just means you're in pretty much uncharted territory.
I know that
Solar wrote:Which is why we made it dead simple to build the crosscompiler environment. Using Cygwin is not exactly rocket science, and the points Creature made are very valid: If you encounter problems further down the road, one half the people here couldn't reproduce your problems even if they wanted to, because they're on Linux.
And what about the other half ?
Re: Grub Error 13 with pe format kernel
Posted: Thu Nov 26, 2009 9:35 am
by Solar
gedd wrote:mbchk seems not be available on cygwin
Perhaps try it on a Linux machine? A LiveCD perhaps? Use the tools available...
And what about the other half ?
Might not have MSVC available either, or bother to install it just to help you... it's something of a "way of least resistance" thing.
Re: Grub Error 13 with pe format kernel
Posted: Fri Nov 27, 2009 10:17 am
by gedd
Solar wrote:gedd wrote:mbchk seems not be available on cygwin
Perhaps try it on a Linux machine? A LiveCD perhaps? Use the tools available...
And what about the other half ?
Might not have MSVC available either, or bother to install it just to help you... it's something of a "way of least resistance" thing.
It seems that i am boring you. Sorry but if you dont want (or cannot) help me , it's your right, you are not obliged, so don't reply.
Do not think i don't know you are a good contributor, it's not a personnal attack, just a remark
So we are going away from subject.
But before answer to "How to boot a PE kernel with GRUB ?"
it may be right to try to answer "How to boot a non-ELF kernel with GRUB ?"
Re: Grub Error 13 with pe format kernel
Posted: Fri Nov 27, 2009 10:44 am
by Solar
Don't get me wrong. Picking up a Linux LiveCD and having a go at your kernel binary with mbchk is a perfectly good suggestion regarding your problem.
Re: Grub Error 13 with pe format kernel
Posted: Fri Nov 27, 2009 11:22 am
by gedd
Solar wrote:Don't get me wrong. Picking up a Linux LiveCD and having a go at your kernel binary with mbchk is a perfectly good suggestion regarding your problem.
Far away from me to get you wrong !
For many reason picking up a Linux LiveCD, so ...
I have answered myself to the question "How to boot a non-ELF kernel with GRUB ?" (A flat binary kernel in fact), the solution is near
It's a very simple flat binary kernel written in assembler, multiboot compliant of course, maybe a good base for a tutorial ?
Re: Grub Error 13 with pe format kernel
Posted: Fri Nov 27, 2009 5:35 pm
by pcmattman
mbchk seems not be available on cygwin
Download the GRUB source and compile it. Problem solved.
Re: Grub Error 13 with pe format kernel
Posted: Fri Nov 27, 2009 9:45 pm
by Solar
gedd wrote:It's a very simple flat binary kernel written in assembler, multiboot compliant of course, maybe a good base for a tutorial ?
Because there are advantages to be had from using an ELF binary instead of a flat binary, which is why we
do have a tutorial for an ELF one.
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 6:07 am
by gedd
pcmattman wrote:Download the GRUB source and compile it. Problem solved.
Try to compile grub on cygwin and you will see that your problem just begin.
Try also cygwin Grub package [1.96-1] and you 'll be there.
Solar wrote:Because there are advantages to be had from using an ELF binary instead of a flat binary, which is why we do have a tutorial for an ELF one.
Question : Do you want a tutorial for non-elf kernel ?
Answer : Of course not, we already have an elf tutorial.
understood .... elf elf elf
Ok thanks for your help my problem is solved.
My PE kernel boot with grub.
[SOLVED]
I let you return to your linux, elf, and magic compilling. Sorry to have woke up you.
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 9:03 am
by fronty
Maybe you could post something about how you solved your problem so someone who runs to similar problems in future would get some help from it.
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 9:15 am
by gedd
I had already make a proposition in that way, it seems that is not interesting
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 10:05 am
by Combuster
gedd wrote:I had already make a proposition in that way, it seems that is not interesting
You did not, and you just proved to be a very bad forum member by keeping
solutions to yourself. We tried to help, and all we get in return is a number of pointless retorts and blanket insults.
You just acted like a noob. Go fix your attitude or you'll find yourself without help later.
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 10:08 am
by Solar
You have to understand one basic thing: We can not, and indeed should not, attempt to describe / provide tutorials for everything you could possibly do.
Because the Wiki would be swamped. GRUB with flat binary, GRUB with ELF, GRUB with PE. Bare bones kernel with C, C++, ASM, D and Pascal. (Actually, 3 out of 5 isn't half bad...) Dozens of ways to set up your GDT. One tutorial for every memory allocator algorithm out there. And so it would go on.
We decided to recommend one thing. We don't discourage people to go another way. As you might have noticed, no-one told you that PE would be a poor choice, we just pointed out that info for a GCC cross-compiler targeting ELF format is readily available and well-tested. If you want to explore uncharted waters, fine. It's part of what this hobby is about. Just don't expect everyone to accomnodate you.
We are always interested in finishing a thread with an answer, not just a "now it works for me". Actually, it is basic netiquette to provive that answer.
Not giving that answer even when asked directly for it, and instead making snide remarks about how we ran this website for the last couple of years doesn't earn you favours.
Next time someone comes around wanting help with his PE-related problems, we'd still not able to help, and indeed might get pretty direct about chosing ELF instead because, "honestly, the last guy around going for GRUB with PE was a prick and didn't want to share knowledge, so we decided not to cater to that type"...
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 12:04 pm
by gedd
Combuster wrote:We tried to help,
yes, by making inappropriate sugestion
Combuster wrote:and all we get in return is a number of pointless retorts and blanket insults.
Pointless retorts from me ? yes probably, but tell me if that was much clever :
Solar wrote:Might not have MSVC available either, or bother to install it just to help you...
Insults ? Where ? This one is not blanket :
Solar wrote:honestly, the last guy around going for GRUB with PE was a prick ...
Solar wrote:As you might have noticed, no-one told you that PE would be a poor choice
No effectively , but it was border line
Solar wrote: we just pointed out that info for a GCC cross-compiler targeting ELF format is readily available and well-tested. If you want to explore uncharted waters, fine.
Yes every one who has read the WIKI know, and it's what we are suposed to do before post.
Solar wrote:Next time someone comes around wanting help with his PE-related problems, we'd still not able to help
So why just say : "we're not able to help you ", there is no shame. Instead why repeating , this way is better, this way is better ?
Solar wrote:We are always interested in finishing a thread with an answer, not just a "now it works for me". Actually, it is basic netiquette to provive that answer.
So maybe a prick has no netiquette
I have proposed a way to make flat binary kernel booting with Grub, because it was a first step.
This first step leads me to understand multiboot works and make GRUB loading a PE kernel.
I feel very disapointed by this.
Combuster wrote:gedd wrote:
I had already make a proposition in that way, it seems that is not interesting
You did not, and you just proved to be a very bad forum member by keeping solutions to yourself. We tried to help, and all we get in return is a number of pointless retorts and blanket insults.
You just acted like a noob. Go fix your attitude or you'll find yourself without help later.
Re: Grub Error 13 with pe format kernel
Posted: Sat Nov 28, 2009 12:37 pm
by neon
gedd wrote:So why just say : "we're not able to help you ", there is no shame. Instead why repeating , this way is better, this way is better ?
Cus there are members here that do use PE that can help (like myself).
Seriously - there is nothing special about getting GRUB to boot a PE file. Its the same as Elf - there is no real difference do to the multiboot specification being file format independent.