8000 Bootloader grammar · trinhduc/build-linux@ce69263 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce69263

Browse files
authored
Bootloader grammar
1 parent b5e73de commit ce69263

File tree

1 file changed

+9
-9
lines changed

1 8000 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ a binary keymap file I use for belgian azerty.
246246
The Boot Loader
247247
---------------
248248
249-
The next step is to install the bootloader, the program that loads our kernel in
249+
The next step is to install the bootloader - the program that loads our kernel in
250250
memory and starts it. For this we use GRUB, one of the most widely used
251251
bootloaders. It has a ton of features but we are going to keep it very simple.
252252
Installing it is very simple, we just do this:
@@ -257,7 +257,7 @@ grub-install --modules=part_msdos \
257257
/dev/loop0
258258
```
259259
The ``--target=i386-pc`` tells grub to use the simple msdos MBR bootloader. This
260-
is often the default but this can vary from machine to machine so you better
260+
is often the default, but this can vary from machine to machine so you better
261261
specify it here. The ``--boot-directory`` options tells grub to install the grub
262262
files in /boot inside the image instead of the /boot of your current system.
263263
``--modules=part_msdos`` is a workaround for a bug in Ubuntu's grub. When you
@@ -266,7 +266,7 @@ think it needs to support msdos partition tables and won't be able to find the
266266
root partition.
267267
268268
Now we just have to configure grub and then our system should be able to boot.
269-
This basicly means telling grub how to load the kernel. This config is located
269+
This basically means telling grub how to load the kernel. This config is located
270270
at ``boot/grub/grub.cfg`` (some distro's use ``/boot/grub2``). This file needs
271271
to be created first, but before we do that, we need to figure something out
272272
first. If you look at ``/proc/cmdline`` on your own machine you might see
@@ -278,14 +278,14 @@ BOOT_IMAGE=/boot/vmlinuz-4.4.0-71-generic root=UUID=83066fa6-cf94-4de3-9803-ace8
278278
These are the arguments passed to your kernel when it's booted. The 'root'
279279
option tells our kernel which device holds the root filesystem that needs to be
280280
mounted at '/'. The kernel needs to know this or it won't be able to boot. There
281-
are different ways of identifying your the root filesystem. Using a UUID is a
281+
are different ways of identifying your root filesystem. Using a UUID is a
282282
good way because it is a unique identifier for the filesystem generated when you
283283
do ``mkfs``. The issue with using this is that the kernel doesn't really
284284
support it because it depends on the implementation of the filesystem. This
285-
works on your system because it uses an initramfs. But we can't use it now. We
285+
works on your system because it uses an initramfs, but we can't use it now. We
286286
could do ``root=/dev/sda1``, this will probably work but it has some other problems.
287-
The 'a' in 'sda' is can depend on the order the bios will load the disk and this
288-
can change when you add a new disk or sometimes the order can change randomly.
287+
The 'a' in 'sda' depends on the order the bios will load the disk and this
288+
can change when you add a new disk, or for a variety of other reasons.
289289
Or when you use a different type of interface/disk it can be something entirely
290290
different. So we need something more robust. I suggest we use the PARTUUID. It's
291291
a unique id for the partition (and not the filesystem like UUID) and this is a
@@ -295,9 +295,9 @@ a GPT thing). We'll find the id like this:
295295
$ fdisk -l ../image | grep "Disk identifier"
296296
Disk identifier: 0x4f4abda5
297297
```
298-
Then we drop the 0x and append the partition number as two digit hexidecimal. A
298+
Then we drop the 0x and append the partition number as two digit hexidecimal. An
299299
MBR only has 4 partitions max so that it's hexidecimal or decimal doesn't really
300-
matter but that's what the standard says. So the grub.cfg should look like this:
300+
matter, but that's what the standard says. So the grub.cfg should look like this:
301301
```
302302
linux /boot/bzImage quiet init=/bin/sh root=PARTUUID=4f4abda5-01
303303
boot

0 commit comments

Comments
 (0)
0