Page 1 of 1

x86-64 Grub question

Posted: Sat Jan 12, 2008 1:56 pm
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?

Posted: Sat Jan 12, 2008 2:18 pm
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.

Posted: Sat Jan 12, 2008 2:32 pm
by crazygray1
Where does GRUB load the kernel?

Posted: Sat Jan 12, 2008 5:13 pm
by Combuster
crazygray1 wrote:Where does GRUB load the kernel?
RTFM. Link already posted. :shock:

Posted: Sat Jan 12, 2008 8:40 pm
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

Posted: Sun Jan 13, 2008 12:14 am
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

Posted: Sun Jan 13, 2008 6:58 am
by crazygray1
my problem was with the ld commands.
thanks

Posted: Sun Jan 13, 2008 2:10 pm
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?

Posted: Sun Jan 13, 2008 2:32 pm
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.

Posted: Sun Jan 13, 2008 2:40 pm
by crazygray1
I have that doc saved on my computer.