Page 2 of 2

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 12:45 am
by Combuster
The wiki wrote:The file at the bottom of the list is not the latest version!

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 4:48 am
by ClundXIII
okay, I got it now, took me a while.

I am still using nasm, is that O.K.?
The multiboot header starts now at 0x1000

The last section (I think the .comment section) is filled with my sourcefile names. Do I have to mind that and how can I delete this section?

My /etc/grub.d/40_custom is now:

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "(Ubuntu with) IMKS/Linux/GNU ... <3" {
        multiboot /boot/imks-linux-gnu
        boot
}
Clund

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 6:00 am
by Combuster
sortie wrote:No, you are not following the instructions of Bare Bones.

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 6:08 am
by Bender
@Clund:No offence, but do you wear your spectacles everyday?

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 8:09 am
by ClundXIII
with 0x1000 I mean the position in the file ...

the segment is at 1M:

Code: Select all

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .multiboot_header 0000003f  00100000  00100000  00001000  2**12
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
EDIT: okay, booting/loading works now ;-)

it just crashes (as i exspected). I think it does this because of the wrong segment attributes (like CODE, READONLY, etc) ... is it possible to manipulate them in the linkerscript?

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 10:19 am
by Combuster
Don't think, know. (And once again, you didn't follow the tutorial)

Hint:

Code: Select all

VMA       LMA
0000003f  00100000

Re: GRUB doesn't want to boot my OS

Posted: Wed Mar 05, 2014 10:33 am
by ClundXIII
Nope, it works!

I am sorry, but now you have to put your glasses on ...
0x3f is the size ...

It is loaded to the correct position and everything, the rest will be debugging and re-writing some parts.
My problem is solved (for now)

Clund