Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

QEMU says no multiboot header found, load kernel first. #39

Closed
varjmes opened this issue Jan 2, 2016 · 4 comments
Closed

QEMU says no multiboot header found, load kernel first. #39

varjmes opened this issue Jan 2, 2016 · 4 comments
Labels

Comments

@varjmes
Copy link
Contributor

varjmes commented Jan 2, 2016

Hello, again.

I got as far as linking my boot.asm and multiboot_header.asm scripts. I had errors trying to turn my files into an .iso but I followed the fix here: #35. Now when I try to load my ISO in QEMU I get:

error: no multiboot header found
error: you need to load the kernel first

As far as I can tell, my code is identical to yours in intermezzOS/kernel. You can see my code here: https://github.com/Charlotteis/charlotteOS

Here is the ouput of the os.iso creation, in case that is useful.

charlotte@var-MacBookPro:~/projects/charlotteOS$ grub-mkrescue -o os.iso isofiles
xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:os.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 68.4g free
Added to ISO image: directory '/'='/tmp/grub.09DKxz'
xorriso : UPDATE : 548 files added in 1 seconds
Added to ISO image: directory '/'='/home/charlotte/projects/charlotteOS/isofiles'
xorriso : UPDATE : 552 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 512 bytes from file '/usr/lib/grub/i386-pc/boot_hybrid.img'
xorriso : UPDATE :  100.00% done
ISO image produced: 5489 sectors
Written to medium : 5489 sectors at LBA 0
Writing to 'stdio:os.iso' completed successfully.

I am running a fresh install of Ubuntu 14 LTS on a 2012-ish Macbook Pro.

@steveklabnik
Copy link
Member

I checked this out locally, and i can reproduce. Something must be off. I looked at everything and it seems accurate.... I have to step out, so I can't look at this more until tonight, but I would try using diff to compare these to the files in https://github.com/intermezzOS/kernel

@sarahhodne
Copy link
Contributor

It looks like the issue is due to a typo in the checksum calculation here: https://github.com/Charlotteis/charlotteOS/blob/db82812d08db0027831311666f4031ecfb485ff4/multiboot_header.asm#L8

The checksum calculation uses 0xe8520d6 as the magic constant instead of 0xe85250d6. I made the exact same typo when I was going through the steps and got the same error, so I was wondering if the constant had been mistyped in the book, but I couldn't find 0xe8520d6 anyware in the code, so it looks like we just made the same typo.

@varjmes
Copy link
Contributor Author

varjmes commented Jan 3, 2016

🙊 my bad! Will test this is the morning, thanks so much @henrikhodne, I can't wait to keep building this.

@varjmes
Copy link
Contributor Author

varjmes commented Jan 3, 2016

That worked perfectly, thank you @henrikhodne and @steveklabnik!

steveklabnik added a commit that referenced this issue Jan 10, 2016
@rylev rylev closed this as completed in #60 Jan 12, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants