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

Commit

Permalink
Include a Troubleshooting chapter
Browse files Browse the repository at this point in the history
Fixes #39
Fixes #45
Fixes #48
  • Loading branch information
steveklabnik committed Jan 10, 2016
1 parent 3a23b04 commit fa49921
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
- [A simple VGA driver]()
- [Keyboard input]()
-----------
[Appendix A: Numeral Systems](appendix/numeral-systems.md)
[Appendix A: Troubleshooting](appendix/troubleshooting.md)
[Appendix B: Numeral Systems](appendix/numeral-systems.md)
71 changes: 71 additions & 0 deletions src/appendix/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Appendix A: Troubleshooting

In this appendix, we will cover common errors and their solutions for
various chapters of the book.

## Chapter 3

Here are various solutions to issues you may run into in Chapter 3:

### Error: no multiboot header found

When booting up your kernel, QEMU may print out a message like this:

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

This can happen for a number of reasons, but is often caused by typo-ing
something. Double check your code against the examples and make sure that
they’re _identical_, especially things like magic numbers. They’re easy to
mis-type.

### Could not read from CDROM (code 0009)

On a system that uses EFI to boot, you may see an error like this:

```text
$ qemu-system-x86_64 -cdrom os.iso
Could not read from CDROM (code 0009)
```

The solution may be to install the `grub-pc-bin` package:

```bash
$ sudo apt-get install grub-pc-bin
```

### xorriso : FAILURE : Cannot find path ‘/efi.img’ in loaded ISO image

When building the ISO, you may see a message like this:

```text
xorriso : FAILURE : Cannot find path ‘/efi.img’ in loaded ISO image
```

The solution may be to install the `mtools` package:

```bash
$ sudo apt-get install mtools
```

### Could not initialize SDL(No available video device) - exiting

When booting your kernel in QEMU, you may see an error like this:

```text
Could not initialize SDL(No available video device) - exiting
```

You can pass an extra flag to QEMU to not use SDL, `-curses`:

```bash
$ qemu-system-x86_64 -curses -cdrom os.iso
```

Or, try installing SDL and its development headers:

```bash
$ sudo apt-get install libsdl2-dev
```

0 comments on commit fa49921

Please sign in to comment.