GRUB doesn't want to boot my OS

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.
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: GRUB doesn't want to boot my OS

Post by Combuster »

The wiki wrote:The file at the bottom of the list is not the latest version!
"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 ]
ClundXIII
Posts: 10
Joined: Tue Mar 04, 2014 7:55 am

Re: GRUB doesn't want to boot my OS

Post 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
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: GRUB doesn't want to boot my OS

Post by Combuster »

sortie wrote:No, you are not following the instructions of Bare Bones.
"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
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: GRUB doesn't want to boot my OS

Post by Bender »

@Clund:No offence, but do you wear your spectacles everyday?
Last edited by Bender on Wed Mar 05, 2014 9:12 am, edited 1 time in total.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
ClundXIII
Posts: 10
Joined: Tue Mar 04, 2014 7:55 am

Re: GRUB doesn't want to boot my OS

Post 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?
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: GRUB doesn't want to boot my OS

Post by Combuster »

Don't think, know. (And once again, you didn't follow the tutorial)

Hint:

Code: Select all

VMA       LMA
0000003f  00100000
"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 ]
ClundXIII
Posts: 10
Joined: Tue Mar 04, 2014 7:55 am

Re: GRUB doesn't want to boot my OS

Post 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
Post Reply