Skip to content

Commit 168c838

Browse files
committed
Merge pull request SamyPesse#32 from escalant3/chapter3-fixes
Some changes in Chapter 3
2 parents df25c7f + 60f2117 commit 168c838

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Chapter-3/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
#### How the boot works?
44

5-
When an x86-based computer is turned on, it begins a complex path to get to the stage where control is transferred to our kernel's "main" routine ("kmain()"). For this course, we are not going to consider new UEFI method but only BIOS boot method.
5+
When an x86-based computer is turned on, it begins a complex path to get to the stage where control is transferred to our kernel's "main" routine ("kmain()"). For this course, we are going to consider only a BIOS boot method and not the new UEFI one.
66

77
The BIOS boot sequence is: RAM detection -> Hardware detection/Initialization -> Boot sequence.
88

9-
The important step for us is the "Boot sequence", where the BIOS is done with its initialization and tries to transfer control to the next stage of the bootloader process.
9+
The most important step for us is the "Boot sequence", where the BIOS is done with its initialization and tries to transfer control to the next stage of the bootloader process.
1010

11-
During the "Boot sequence", the BIOS will first choose the "boot device" (floppy disk, hard-disk, CD, usb flash memory device or network). Our Operating system will first boot from the hard-disk (but it will be possible to boot it from a CD or a usb flash memory device).
11+
During the "Boot sequence", the BIOS will first choose the "boot device" (floppy disk, hard-disk, CD, usb flash memory device or network). Our Operating System will first boot from the hard-disk (but it will be possible to boot it from a CD or a usb flash memory device).
1212

1313
The BIOS will read 512 bytes from the first valid bootsector (where the last two bytes are 0x55 0xAA), or lock up with an error message if it cannot find one. And it'll transfer these 512 bytes into physical memory starting at address 0x7c00 then starts running the code that now begins at 0x7c00.
1414

@@ -68,7 +68,7 @@ struct multiboot_info {
6868
};
6969
```
7070

71-
You can use the command ```mbchk kernel.elf``` to validate your kernel.elf file against the multiboot standard. You also use the command ```nm -n kernel.elf``` to validate the offset of the different objects in the ELF binary.
71+
You can use the command ```mbchk kernel.elf``` to validate your kernel.elf file against the multiboot standard. You can also use the command ```nm -n kernel.elf``` to validate the offset of the different objects in the ELF binary.
7272

7373
#### Create a disk image for our kernel and grub
7474

@@ -128,7 +128,7 @@ fdisk ./c.img
128128
> w
129129
```
130130

131-
We need now to attach the created partition to loop-device (which allow a file to be access like a block device) using losetup. The offset of the partition is passed as an argument and calculated using: **offset= start_sector * bytes_by_sector**.
131+
We need now to attach the created partition to the loop-device (which allows a file to be access like a block device) using losetup. The offset of the partition is passed as an argument and calculated using: **offset= start_sector * bytes_by_sector**.
132132

133133
Using ```fdisk -l -u c.img```, you get: 63 * 512 = 32356.
134134

@@ -170,5 +170,5 @@ losetup -d /dev/loop1
170170

171171
#### See Also
172172

173-
* [GNU GRUB on wikipedia](http://en.wikipedia.org/wiki/GNU_GRUB)
173+
* [GNU GRUB on Wikipedia](http://en.wikipedia.org/wiki/GNU_GRUB)
174174
* [Multiboot specification](https://www.gnu.org/software/grub/manual/multiboot/multiboot.html)

0 commit comments

Comments
 (0)