@@ -246,7 +246,7 @@ a binary keymap file I use for belgian azerty.
246
246
The Boot Loader
247
247
---------------
248
248
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
250
250
memory and starts it. For this we use GRUB, one of the most widely used
251
251
bootloaders. It has a ton of features but we are going to keep it very simple.
252
252
Installing it is very simple, we just do this:
@@ -257,7 +257,7 @@ grub-install --modules=part_msdos \
257
257
/dev/loop0
258
258
` ` `
259
259
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
261
261
specify it here. The ` ` --boot-directory` ` options tells grub to install the grub
262
262
files in /boot inside the image instead of the /boot of your current system.
263
263
` ` --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
266
266
root partition.
267
267
268
268
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
270
270
at ` ` boot/grub/grub.cfg` ` (some distro' s use ``/boot/grub2``). This file needs
271
271
to be created first, but before we do that, we need to figure something out
272
272
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
278
278
These are the arguments passed to your kernel when it' s booted. The ' root'
279
279
option tells our kernel which device holds the root filesystem that needs to be
280
280
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
282
282
good way because it is a unique identifier for the filesystem generated when you
283
283
do ``mkfs``. The issue with using this is that the kernel doesn' t really
284
284
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
286
286
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 .
289
289
Or when you use a different type of interface/disk it can be something entirely
290
290
different. So we need something more robust. I suggest we use the PARTUUID. It' s
291
291
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:
295
295
$ fdisk -l ../image | grep " Disk identifier"
296
296
Disk identifier: 0x4f4abda5
297
297
` ` `
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
299
299
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:
301
301
```
302
302
linux /boot/bzImage quiet init=/bin/sh root=PARTUUID=4f4abda5-01
303
303
boot
0 commit comments