Page 1 of 1

Problems with grub

Posted: Fri May 10, 2013 9:42 am
by MadZarx
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? :D :D

Re: Problems with grub

Posted: Fri May 10, 2013 5:32 pm
by Mikemk
Firstly, there are tutorials throughout the wiki.
That aside, you never specified which version of grub...

Re: Problems with grub

Posted: Sat May 11, 2013 9:50 am
by MadZarx
I know but that's all about the structure of grub (I think :mrgreen: ) I couldn't see anything about compiling in Table of contents. :oops:
Btw can I build it in windows??

Re: Problems with grub

Posted: Sat May 11, 2013 10:00 am
by Mikemk
MadZarx wrote:I couldn't see anything about compiling in Table of contents. :oops:
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...)

Re: Problems with grub

Posted: Sun May 12, 2013 12:23 am
by MadZarx
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 :cry:
Btw is there any other bootloaders except GRUB? can they boot any images?

Re: Problems with grub

Posted: Sun May 12, 2013 5:24 am
by osdog
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 :cry:
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.

Re: Problems with grub

Posted: Sun May 12, 2013 6:22 am
by jnc100
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.

Regards,
John.

Re: Problems with grub

Posted: Tue May 14, 2013 12:29 am
by MadZarx
osdog wrote:
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 :cry:
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 :shock: !!

Anyway I can use linux shell for my development.
Thanks for your help :D :D
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.

Regards,
John.
Thank you too John :D :D

Re: Problems with grub

Posted: Tue May 14, 2013 7:45 am
by Rhoin
MadZarx wrote:
osdog wrote:
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 :cry:
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 :shock: !!

Anyway I can use linux shell for my development.
Thanks for your help :D :D


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.

Re: Problems with grub

Posted: Tue May 14, 2013 10:34 am
by iansjack
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.

http://sourceforge.net/projects/grub4dos/

Re: Problems with grub

Posted: Tue May 14, 2013 11:39 am
by osdog
iansjack wrote:http://sourceforge.net/projects/grub4dos/
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!

Re: Problems with grub

Posted: Tue May 14, 2013 11:41 am
by iansjack
That's OK. :)

Re: Problems with grub

Posted: Thu May 16, 2013 1:00 pm
by MadZarx
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

Sorry for my bad English

Re: Problems with grub

Posted: Sat May 18, 2013 12:11 pm
by MadZarx
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 :D :D :D 8)