x86-64 Grub question

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.
Post Reply
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

x86-64 Grub question

Post by crazygray1 »

when you install grub on an ISO when running a 64 bit OS does Grub enter long mode for you? Where can I find more info on what Grub does?
User avatar
bluecode
Member
Member
Posts: 202
Joined: Wed Nov 17, 2004 12:00 am
Location: Germany
Contact:

Post by bluecode »

Grub legacy conforms to the Multiboot Specification and does not enter long mode for you. Grub2 might (read as I don't know) do this, but it is not yet stable.
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

Where does GRUB load the kernel?
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:

Post by Combuster »

crazygray1 wrote:Where does GRUB load the kernel?
RTFM. Link already posted. :shock:
"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
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

  • kristian@Kristian:~/Documents/Decipher/Source/Kernel$ ld linker.ld kernel.o startkernel.o
    ld: i386 architecture of input file `kernel.o' is incompatible with i386:x86-64 output
    ld: i386 architecture of input file `startkernel.o' is incompatible with i386:x86-64 output
    kristian@Kristian:~/Documents/Decipher/Source/Kernel$ ld linker.ld kernel.o startkernel.o
what do I do to change this
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

To emulate i386 on 64 bit:
gcc: -m32

nasm: -f elf32

gas: --32

ld: -m elf_i386

Those are the options for the commands.
(you may have to re-compile)
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

my problem was with the ld commands.
thanks
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

someone on the IRC said that when booting from a cd that your bootloader has to be 2kb is that the limit? Or is there a limit at all?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

I have a hard time beleving you actually carefully read that Wiki page... :roll:

Look carefully at the "External links" section... there is a "related" document there.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

I have that doc saved on my computer.
Post Reply