i have been reading the tutorial : http://www.osdever.net/bkerndev/index.php by Mr Brandon F.
in this tutorial when we link all the files we get a kernel.bin file. how do we boot our computer from this binary file??
He does mention in the tutorial: "GRUB needs to be directed to a protected mode binary image: this 'image' is our kernel, which we will be building. "
can sumone tell me how can we boot our computer using kernel.bin with GRUB? can it be done without GRUB too?
loading the kernal.bin file
- JackScott
- Member
- Posts: 1036
- Joined: Thu Dec 21, 2006 3:03 am
- Location: Hobart, Australia
- Mastodon: https://aus.social/@jackscottau
- Matrix: @JackScottAU:matrix.org
- GitHub: https://github.com/JackScottAU
- Contact:
There's an image provided by Brandon in his tutorial that contains an installation of GRUB on a FAT12 floppy. I suggest you download this file, write it to a floppy disk using Rawrite or similar, and copy the kernel.bin you created to the root directory of this floppy. If you then reboot your computer, it should boot the kernel.
Edit: No, the code provided by Brandon won't boot without GRUB. If you wanted it to, you'd need to write some 16-bit real mode to 32-bit protected mode changing code. It's better just to use GRUB (IMHO, at least).
Edit: No, the code provided by Brandon won't boot without GRUB. If you wanted it to, you'd need to write some 16-bit real mode to 32-bit protected mode changing code. It's better just to use GRUB (IMHO, at least).
it worked grt...thnks a lot
i have grub installed on my system. can i use it somehow to load this kernel.bin file?? m really scared to experiment on my system....but the GRUB which loads the windows and linux, can it be used to load the kernel.bin file which we have generated after reading the tutorial??
i have gone through sum basic bootloaders....but never through one which loads a binary file!!! can u point me out to a resource where i find the tutorial on the same so dat i can make my oen bootloader to load te kernel.bin file???
i have grub installed on my system. can i use it somehow to load this kernel.bin file?? m really scared to experiment on my system....but the GRUB which loads the windows and linux, can it be used to load the kernel.bin file which we have generated after reading the tutorial??
i have gone through sum basic bootloaders....but never through one which loads a binary file!!! can u point me out to a resource where i find the tutorial on the same so dat i can make my oen bootloader to load te kernel.bin file???
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
I'm not offended. Just plain annoyed that you ignored the "Read me" link and "posting rules" thread even after being pointed at itm sry if i offended u
that was *not* what you asked.i wasnt sure abt it as it wud shut my system down
back to the link (I really urge you to read it thoroughly as well as the other 90% of that document):
--------------------------More generally, if you write like a semi-literate boob you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like an semi-literate boob to save two entire keystrokes. Worse: writing like a l33t script kiddie hax0r is the absolute kiss of death and guarantees you will receive nothing but stony silence (or, at best, a heaping helping of scorn and sarcasm) in return.
(...)
Often, people who need technical help have a high-level goal in mind and get stuck on what they think is one particular path towards the goal. They come for help with the step, but don't realize that the path is wrong. It can take substantial effort to get past this.
Stupid:
How do I get the color-picker on the FooDraw program to take a hexadecimal RGB value?
Smart:
I'm trying to replace the color table on an image with values of my choosing. Right now the only way I can see to do this is by editing each table slot, but I can't get FooDraw's color picker to take a hexadecimal RGB value.
So far the rant, now to your 'problem':
It will more likely reboot, but I guess that's not your real question either...
Grub loads all its file from disk, and so does windows/linux. If you want to mess up any existing OS you must change those things that
1) affect them
2) persist even when you disconnect power
Unless you blow up your hardware (which is very unlikely) that means that you must have made changes to the hard disk.
Since starting a write to disk is harly anything that happens by accident, it simply means that when you do not include any code that accesses the hard disk, your existing setup will be pretty much safe. The only fried setups I ever had was because of a broken windows installler without me noticing the error in time (128G will always be enough? )
The tutorial does not really create a 'flat' binary, but instead a multiboot image. GRUB is one of the bootloaders capable of booting such images. There are more, but they're non-standard and even self-written bootloaders are more abundant. If you want to go all the way, you can drop the multiboot format and write your own bootloader, or even a mixture of both. The wiki has the so-called babystep tutorial that deals with bootloaders.
Scared about grub? You really can't screw up a grub installation by changing the grub configuration file. At max grub will spit out an error that it can't read the file and then redirect you to a command line prompt.
You can then use the cat command to read the configuration file and type in the commands to boot linux or windows yourself.
You can then use the cat command to read the configuration file and type in the commands to boot linux or windows yourself.