Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello everyone. This is my first post in osDev so I'm so sorry if I have asked this in wrong forum.
I have two very simple kernels one is written in C++ and other in Assembly and the images are ready but I don't have time to learn how to build a bootloader so I decided to use an existing one, like GRUB.
I have downloaded the lastest version but I can't find any bootloader binary files to put it in the bootsector. I thought that I should build it myself but I don't know how.
Can someone tell me how can I boot one of my kernels from GRUB?
I know but that's all about the structure of grub (I think ) I couldn't see anything about compiling in Table of contents.
Btw can I build it in windows??
MadZarx wrote:I couldn't see anything about compiling in Table of contents.
Do you mean the menu? That's built at boot time based on config files on the hard drive.
Btw can I build it in windows??
Not very likely. I had to switch to linux because most this stuff can't be done in windows. I actually like it better (faster, more stable, free, less buearocratic...)
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
Oh too bad cuz my old PC is too slow for any linux distro with desktop environments. I've even tried lxde but its not as fast as windows for me
Btw is there any other bootloaders except GRUB? can they boot any images?
MadZarx wrote:Oh too bad cuz my old PC is too slow for any linux distro with desktop environments. I've even tried lxde but its not as fast as windows for me
Btw is there any other bootloaders except GRUB? can they boot any images?
How old is your PC?! I was running Ubuntu 10.04. Desktop (with GNOME) recently on a P II 233 MHz and it ran without hiccups. Granted I wouldn't want to compile anything on it but it will be capable of running "sudo grub-install --root-directory=/media/$name /dev/sdx"
Anyway if you have an up to date Windows machine you can just grab VirtualBox and install a Debian or Ubuntu in it.
Actually the Ubuntu Live CD comes with a VM built in so you can install it within Windows. Though I've never tried that.
Lastly I also recommend using Linux or another *nix variant for Kernel and OS development because it comes with all the tools and is way more friendly to this kind of activity while Windows is very locked down in that regard.
If you want to stick with Windows, then Cygwin includes a 'grub' package. Simply install that and then you can use 'grub-mkrescue --output=image.iso <dir>' to create a bootable iso image. Put your kernel somewhere underneath <dir> and a valid grub.cfg in <dir>/boot/grub first.
MadZarx wrote:Oh too bad cuz my old PC is too slow for any linux distro with desktop environments. I've even tried lxde but its not as fast as windows for me
Btw is there any other bootloaders except GRUB? can they boot any images?
How old is your PC?! I was running Ubuntu 10.04. Desktop (with GNOME) recently on a P II 233 MHz and it ran without hiccups. Granted I wouldn't want to compile anything on it but it will be capable of running "sudo grub-install --root-directory=/media/$name /dev/sdx"
My PC has an Intel pentium 4 Single core and clocked at 2.8GHz and a DDR 1GiB memory with a 128MiB VGA card but it lags when I want to run any linux distro. It's not as fast as Windows XP. My PC can't even run windows 8 !!
Anyway I can use linux shell for my development.
Thanks for your help
jnc100 wrote:If you want to stick with Windows, then Cygwin includes a 'grub' package. Simply install that and then you can use 'grub-mkrescue --output=image.iso <dir>' to create a bootable iso image. Put your kernel somewhere underneath <dir> and a valid grub.cfg in <dir>/boot/grub first.
MadZarx wrote:Oh too bad cuz my old PC is too slow for any linux distro with desktop environments. I've even tried lxde but its not as fast as windows for me
Btw is there any other bootloaders except GRUB? can they boot any images?
How old is your PC?! I was running Ubuntu 10.04. Desktop (with GNOME) recently on a P II 233 MHz and it ran without hiccups. Granted I wouldn't want to compile anything on it but it will be capable of running "sudo grub-install --root-directory=/media/$name /dev/sdx"
My PC has an Intel pentium 4 Single core and clocked at 2.8GHz and a DDR 1GiB memory with a 128MiB VGA card but it lags when I want to run any linux distro. It's not as fast as Windows XP. My PC can't even run windows 8 !!
Anyway I can use linux shell for my development.
Thanks for your help
You can use lightweight distros like Lubuntu, Crunch Bang..etc(if you want of course).I have a test machine with nearly same specs.Even Ubuntu's Unity works with some lag.
GRUB is OS agnostic. It's nothing to do with Windows, Linux, BSD, or any other OS. It lets you boot any of these OSs. I despair at the level of knowledge demonstrated on this site recently.
Great. Now the OP can try if this DOS port of GRUB works on his Windows machine.
Also it is very unfortunate that I first had to aggravate you, with my lack of knowledge about which platforms the GNU GRUB user land configuration tools have been ported to by which project, before you came forward with your knowledge.
I think the OP will really appreciate your help!
Rhoin wrote:
You can use lightweight distros like Lubuntu, Crunch Bang..etc(if you want of course).I have a test machine with nearly same specs.Even Ubuntu's Unity works with some lag.
Okay I will give these distros a try but I think ubuntu lags for me.
Thanks guys I didn't know that I should build grub and other important things only in nix OSs I thought that windows is poweful enough to be able to do these all but now I see windows is only good for gamming!!
Thank you guys for your help. My problem only was with a bootloader and now I got it : D
Rhoin wrote:
You can use lightweight distros like Lubuntu, Crunch Bang..etc(if you want of course).I have a test machine with nearly same specs.
Thanks man I have downloaded and installed #! (crunchbang). Its the fastest OS I have ever used. It feets my PC and my needs. Today I have built grub for my kernel images and it worked well. Thanks Rhoin