[question]how do i boot with grub binaries?

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.
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

[question]how do i boot with grub binaries?

Post by iON »

i have tried a method that showes up several places in which stage1 and stage2 are combined then PartCopied to the disk.
when i do this it boots,but it corrupts the FS and i cannot load "kernel.bin" nor can i add more files because windows just wants to format. :?
is the a way to get this to work?
(i tried making a bootloader but it doesn't load anything 'cept the welcome message.)
User avatar
Combuster
Member
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:

Re: [question]how do i boot with grub binaries?

Post by Combuster »

STFW. Same question was asked two threads down, and full instructions are available on the wiki.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: [question]how do i boot with grub binaries?

Post by Karlosoft »

What is your FS?
How is the bootsector?
If you copy your nsectors second stage on the main structure of a FAT12 I guess, It is corrupted!
You can use the second stage as a file and so you have to load it from stage 1 or you have to add some reserved sectors on the MBR...
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

Combuster wrote:STFW. Same question was asked two threads down, and full instructions are available on the wiki.
I KNEW you would say something like that!why are you so negative???
they dont.the only ones shown are links to the bad one :P
(btw i joined to learn about OS development.if writing about building OS is wrong please tell me where to do so.)
User avatar
Combuster
Member
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:

Re: [question]how do i boot with grub binaries?

Post by Combuster »

iON wrote:why are you so negative???
Because someone is ignoring forum rules, repeatedly? You made two posts that break important forum rules, another 4 that are simply offtopic, and only one that can actually be considered to contribute something.

Does the following sound familiar to you? (if not, I have to add not even reading the forum rules to the list of complaints)
What we are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this "losers" (and for historical reasons we sometimes spell it "lusers").


I can ignore you too. Do you prefer not having your problem solved?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

sorry.
:oops: :oops: :oops: :oops: :oops:
nevermind...
i quit.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: [question]how do i boot with grub binaries?

Post by Solar »

The relevant part of the Wiki is GRUB, section "Installing to floppy". It doesn't say anything about PartCopy, but goes into detail about the two-stage process involved to have stage2 properly reside in the filesystem. Proper reading of the article even reveals links to ready-made floppy images you can use.
Every good solution is obvious once you've found it.
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: [question]how do i boot with grub binaries?

Post by Chandra »

iON wrote:sorry.
:oops: :oops: :oops: :oops: :oops:
Apology accepted.
nevermind...
i quit.
You may want to reconsider that.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

berkus wrote:It takes some discipline and patience to do OSdev, if person lacks either or worse, both, better let them go.
No, i just quit trying to find how to make an OS here specificly.
the wiki is good,though.
i have been trying to look for another site dedicated to OSdeving,but havn't found one.
(i will still work on ION OS but unless i can find some help for once ill go back to doing it myself.)
User avatar
Combuster
Member
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:

Re: [question]how do i boot with grub binaries?

Post by Combuster »

iON wrote:unless i can find some help for once
Image


The relevant part of the Wiki is GRUB
The same question was asked two threads down
You can use the second stage as a file and so you have to load it from stage 1 or you have to add some reserved sectors on the MBR
Do you prefer not having your problem solved?
It really, really helps if you don't exclusively interpret everything said to you as an insult.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: [question]how do i boot with grub binaries?

Post by Chandra »

berkus wrote:It takes some discipline and patience to do OSdev, if person lacks either or worse, both, better let them go.
Just thought that this guy needed a fresh start.
Combuster wrote:It really, really helps if you don't exclusively interpret everything said to you as an insult.
That's the point. He has all the answers he needed, he's just ignoring them. :shock:
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

I finaly made a working bootloader!
thanks goes to:
http://www.brokenthorn.com/Resources/OSDev6.html
i got it to load.no "ELF"junk that never works :mrgreen: :mrgreen:
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: [question]how do i boot with grub binaries?

Post by piranha »

iON wrote:I finaly made a working bootloader!
thanks goes to:
http://www.brokenthorn.com/Resources/OSDev6.html
i got it to load.no "ELF"junk that never works :mrgreen: :mrgreen:
Linking kernels as ELF and loading them in GRUB works perfectly well (thats how my kernel is, as many others are too), you simply did it wrong.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

I meant multiboot.i couldnt get GRUB to use my custom multiboot-compat systems.
i think i will be using ELF when i want all the files to be the same kind(hint:thats a good thing!)
:mrgreen:
i might share small builds of the cli if i can get that done.just exited about seeing it boot something
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: [question]how do i boot with grub binaries?

Post by iON »

berkus wrote:
iON wrote:I meant multiboot.i couldnt get GRUB to use my custom multiboot-compat systems.
Sorry? Did you just say you cannot implement multiboot support in your kernel properly?
im realy not sure.i might try working on linux but not now.
so far im researching functions,etc.
the reason i dont "ld -T link.ld kernst.o fun.o otherfun.o -o mygreat kernel.bin"is because it gives me the error:

Code: Select all

ld:cannot perform PE operations on non-PE.
if it's NOT "nasm -f COFF ..."then it says:

Code: Select all

ld:kernst.o: unrecognized file format
i figured to use COFF becuase a test i did on one of the files.
i was orginaly going to do this for fun and enjoy learning,but not much anymore :(

This is only in a fraction related+grub wont compile on windows.
Locked