You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/bootloader.md
+121-67
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ A bootloader takes care of getting the operating system started up. It is also r
21
21
22
22
### Important Note
23
23
24
-
If you need to configure grub-pc (for example, after an update), installing GRUB to all devices will break GRUB. You will need to install to `/dev/sda`_not_`/dev/sda1`.
24
+
If you need to configure grub-pc (for example, after an update), installing GRUB to all devices will break GRUB. You will need to install to `/dev/sda`or `/dev/nvme0n1`_not_`/dev/sda1` or `/dev/nvme0n1p1`.
25
25
26
26
On a fresh install of Pop!_OS 18.04 and newer, <u>systemd-boot</u> is used rather than the <u>GRUB</u> bootloader. The following instructions only apply to systems using the GRUB bootloader, otherwise refer to the <u>systemd-boot</u> section of this article.
27
27
@@ -33,11 +33,7 @@ Please see our instructions for making a live disk of Pop!_OS [here](/articles/l
33
33
34
34
### Boot from Live Disk
35
35
36
-
Once you have the disk made, reboot your system. You'll need to tell the computer to boot from the live disk. When you see the System76 logo on the screen, press and hold the appropriate key for your system:
37
-
38
-
Laptops | Desktops
39
-
-------- | --------
40
-
Hold <kbd>Esc</kbd>, <kbd>F7</kbd>, or <kbd>F1</kbd> | Hold <kbd>F8</kbd>, <kbd>F10</kbd>, or <kbd>F12</kbd>
36
+
Once you have the disk made, reboot your system. You'll need to tell the computer to boot from the live disk. When you see the System76 logo on the screen, press and hold the appropriate key for your system based on this [article](/articles/boot-menu).
41
37
42
38
Use the arrow keys and Enter key to select the live disk from the boot menu.
43
39
@@ -68,13 +64,29 @@ Pop!_OS 20.04 LTS
68
64
4 496GB 500GB 4295MB linux-swap(v1) swap
69
65
```
70
66
71
-
---
67
+
Ubuntu 22.04 LTS
72
68
73
-
## How to tell if your system is EFI-based or legacy boot
69
+
```
70
+
Number Start End Size File system Name Flags
71
+
1 1047kB 538MB 537MB fat32 EFI System Partition boot, esp
72
+
2 538MB 496GB 491GB ext4
73
+
```
74
+
75
+
Pop!_OS 22.04 LTS
74
76
75
-
## systemd-boot
77
+
```
78
+
Number Start End Size File system Name Flags
79
+
1 2097kB 524MB 522MB fat32 boot, esp
80
+
2 524MB 4819MB 4295MB fat32 recovery msftdata
81
+
3 4819MB 496GB 491GB ext4 root
82
+
4 496GB 500GB 4295MB linux-swap(v1) swap
83
+
```
76
84
77
-
### EFI Boot
85
+
**NOTE:** A BIOS install of Pop!\_OS will not have a Recovery Partition and the Flags for the Boot Partition will not note esp.
86
+
87
+
---
88
+
89
+
## How to tell if your system is EFI-based or legacy boot
78
90
79
91
Most computers sold after 2014 use UEFI mode. If `boot, esp` is listed under `flags` in the earlier `parted` output, then the system is installed in UEFI mode. You can also use this command to verify that your OS is installed in UEFI mode:
80
92
@@ -90,11 +102,29 @@ Installed in UEFI mode
90
102
support@pop-os:~$
91
103
```
92
104
93
-
Additionally, if `bios_grub` is listed under `flags`, the system is installed in legacy BIOS mode.
105
+
Additionally, if `esp` is not listed under `flags` for the Boot Partition, the system is installed in legacy BIOS mode.
94
106
95
107
### EFI Boot - Pop!_OS (systemd-boot)
96
108
97
-
If the echo command at the beginning of this page says that the OS is installed in EFI mode **and** you are using Pop!_OS, follow this section. Please note that if you have an encrypted disk, you will need to first unlock it as described below.
109
+
If the echo command at the beginning of this page says that the OS is installed in EFI mode **and** you are using Pop!_OS, follow this section. Please note that if you have an encrypted disk, you will need to first unlock it as described below. Running the command below will let us know if the drive is encrypted:
110
+
111
+
```bash
112
+
sudo cryptsetup luksDump /dev/nvme0n1p3
113
+
```
114
+
115
+
or
116
+
117
+
```bash
118
+
sudo cryptsetup luksDump /dev/sda3
119
+
```
120
+
121
+
If you get the output below then you do not need to decrypt the drive first:
122
+
123
+
```
124
+
Device /dev/nvme0n1p3 or /dev/sda3 is not a valid LUKS device.
125
+
```
126
+
127
+
If it is a valid LUKS device then follow these [steps](/articles/bootloader#encrypted-disk) to decrypt the drive first.
98
128
99
129
First, we need to mount the OS partitions. Run these commands based on what type of disk you have:
100
130
@@ -103,7 +133,7 @@ First, we need to mount the OS partitions. Run these commands based on what type
103
133
|`sudo mount /dev/nvme0n1p3 /mnt`|`sudo mount /dev/sda3 /mnt`|
104
134
|`sudo mount /dev/nvme0n1p1 /mnt/boot/efi`|`sudo mount /dev/sda1 /mnt/boot/efi`|
105
135
106
-
If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p3` or `sda3` with the Pop!_OS root partition and `nvme0n1p1` or `sda1` with the EFI system partition (ESP).
136
+
>**NOTE:**If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p3` or `sda3` with the Pop!_OS root partition and `nvme0n1p1` or `sda1` with the EFI system partition (ESP).
107
137
108
138
Then continue with the following commands for either disk type:
109
139
@@ -116,46 +146,76 @@ exit
116
146
sudo bootctl --path=/mnt/boot/efi install
117
147
```
118
148
119
-
##GRUB EFI Boot
149
+
### EFI Boot - Ubuntu (GRUB)
120
150
121
-
Most computers sold after 2014 use UEFI mode. If `boot, esp` is listed under `flags` in the `parted` output from earlier, then the system is installed in UEFI mode. You can also use this command to see if the OS is installed in UEFI mode:
151
+
If the echo command at the beginning of this page says that the OS is installed in EFI mode **and** you are using Ubuntu, follow this section. Please note that if you have an encrypted disk, you will need to first unlock it as described below. Running the command below will let us know if the drive is encrypted:
122
152
123
153
```bash
124
-
[ -d /sys/firmware/efi ] &&echo"Installed in UEFI mode"||echo"Installed in Legacy mode"
154
+
sudo cryptsetup luksDump /dev/nvme0n1p2
125
155
```
126
156
127
-
Run these commands based on what type of disk you have:
157
+
or
158
+
159
+
```bash
160
+
sudo cryptsetup luksDump /dev/sda2
161
+
```
162
+
163
+
If you get the output below then you do not need to decrypt the drive first:
164
+
165
+
```
166
+
Device /dev/nvme0n1p2 or /dev/sda2 is not a valid LUKS device.
167
+
```
168
+
169
+
If it is a valid LUKS device then follow these [steps](/articles/bootloader#encrypted-disk) to decrypt the drive first.
170
+
171
+
First, we need to mount the OS partitions. Run these commands based on what type of disk you have:
|`sudo mount /dev/nvme0n1p2 /mnt`|`sudo mount /dev/sda2 /mnt`|
132
176
|`sudo mount /dev/nvme0n1p1 /mnt/boot/efi`|`sudo mount /dev/sda1 /mnt/boot/efi`|
133
177
134
-
If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p2` or `sda2` with the Pop!_OS root partition and `nvme0n1p1` or `sda1` with the boot partition.
178
+
If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p2` or `sda2` with the Ubuntu root partition and `nvme0n1p1` or `sda1` with the EFI system partition (ESP).
135
179
136
180
Then continue with the following commands for either disk type:
137
181
138
182
```bash
139
183
foriin dev dev/pts proc sys run;do sudo mount -B /$i /mnt/$i;done
If `bios_grub` is listed under `flags`, the system is installed in BIOS mode. You can also use this command to see if the OS is installed in BIOS mode:
193
+
If the echo command at the beginning of this page says that the OS is installed in Legacy mode**and** you are using Ubuntu, follow this section. Please note that if you have an encrypted disk, you will need to first unlock it as described below. Running the command below will let us know if the drive is encrypted:
149
194
150
195
```bash
151
-
[ -d /sys/firmware/efi ] &&echo"Installed in UEFI mode"||echo"Installed in Legacy mode"
196
+
sudo cryptsetup luksDump /dev/nvme0n1p3
197
+
```
198
+
199
+
or
200
+
201
+
```bash
202
+
sudo cryptsetup luksDump /dev/sda3
152
203
```
153
204
205
+
If you get the output below then you do not need to decrypt the drive first:
206
+
207
+
```
208
+
Device /dev/nvme0n1p3 or /dev/sda3 is not a valid LUKS device.
209
+
```
210
+
211
+
If it is a valid LUKS device then follow these [steps](/articles/bootloader#encrypted-disk) to decrypt the drive first.
212
+
154
213
Run these commands based on what type of disk you have:
|`sudo mount /dev/nvme0n1p2 /mnt`|`sudo mount /dev/sda2 /mnt`|
218
+
|`sudo mount /dev/nvme0n1p1 /mnt/boot/`|`sudo mount /dev/sda1 /mnt/boot/`|
159
219
160
220
If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p2` or `sda2` with the Pop!_OS root partition.
161
221
@@ -171,80 +231,74 @@ update-initramfs -c -k all
171
231
sudo update-grub
172
232
```
173
233
174
-
### Encrypted Disk
234
+
### Legacy BIOS Boot - Ubuntu (GRUB)
175
235
176
-
Pop!_OS supports full-disk encryption as an option by default, whereas, Ubuntu does not. If you are on Ubuntu, you likely don't need to follow this section.
177
-
178
-
To get access to an encrypted disk, these additional commands need to be run in order to unlock the disk. Please use the `parted` command described above to determine the correct drive and partition. The encrypted partition will typically be the largest one on the main drive.
If the echo command at the beginning of this page says that the OS is installed in Legacy mode **and** you are using Ubuntu, follow this section. Please note that if you have an encrypted disk, you will need to first unlock it as described below. Running the command below will let us know if the drive is encrypted:
183
237
184
238
```bash
185
-
sudo lvscan
186
-
sudo vgchange -ay
239
+
sudo cryptsetup luksDump /dev/nvme0n1p2
187
240
```
188
241
189
-
Take note as to what the volume group is called. Substitute the correct info into this next command. Make sure that `-root` is on the end.
190
-
191
-
After running the `vgchange` command, take note of what the volume group is called. Substitute the correct info into this next command. Make sure that `-root` is added to the end of the volume group name:
242
+
or
192
243
193
244
```bash
194
-
sudo mount /dev/mapper/data-root /mnt
245
+
sudo cryptsetup luksDump /dev/sda2
195
246
```
196
247
197
-
Now the existing hard drive can be accessed by going to the `/mnt` folder. To use the <u>Files</u> program, go to `+ Other Locations` -> `Computer` and then click on the `/mnt` folder.
248
+
If you get the output below then you do not need to decrypt the drive first:
198
249
199
-
### EFI Boot - Ubuntu
250
+
```
251
+
Device /dev/nvme0n1p2 or /dev/sda2 is not a valid LUKS device.
252
+
```
200
253
201
-
If the echo command above says the system is installed in EFI mode **and** you are using Ubuntu, follow this section.
254
+
If it is a valid LUKS device then follow these [steps](/articles/bootloader#encrypted-disk) to decrypt the drive first.
202
255
203
-
First, we need to mount the OS partitions. Run these commands based on what type of disk you have (based on the ```parted``` output from your system):
256
+
Run these commands based on what type of disk you have:
|`sudo mount /dev/nvme0n1p2 /mnt`|`sudo mount /dev/sda2 /mnt`|
261
+
|`sudo mount /dev/nvme0n1p1 /mnt/boot/`|`sudo mount /dev/sda1 /mnt/boot/`|
209
262
210
-
<u>chroot</u> is a way to run commands as if the existing operating system had been booted. Once the chroot commands have been run, then package manager (<u>apt</u>) and other system level commands can be run.
263
+
If you are using a non-default partitioning scheme (such as a dual boot), replace `nvme0n1p2` or `sda2` with the Pop!_OS root partition.
211
264
212
-
The EFI partition is usually around 512MB, and that is the partition to substitute into the next command. The Recovery partition is around 4GB.
265
+
Then continue with the following commands for either disk type:
As mentioned above, if `bios_grub` is listed under `flags`, the system is installed in legacy BIOS mode. If this is the case, you need to follow this section to repair your bootloader.
279
+
Pop!_OS supports full-disk encryption as an option by default, whereas, Ubuntu does not. If you are on Ubuntu, you likely don't need to follow this section.
230
280
231
-
Run these commands based on what type of disk you have:
281
+
To get access to an encrypted disk, these additional commands need to be run in order to unlock the disk. Please use the `parted` command described above to determine the correct drive and partition. The encrypted partition will typically be the largest one on the main drive.
|```sudo mount /dev/nvme0n1p2 /mnt```|```sudo mount /dev/sda2 /mnt```|
292
+
Take note as to what the volume group is called. Substitute the correct info into this next command. Make sure that `-root` is on the end.
236
293
237
-
You now have root administrator access to your installed OS. If you are trying to either fix or undo changes that you made to the system, you now have the access to do so. Once you are done, to exit from the <u>chroot</u> and reboot the computer, run these commands:
294
+
After running the `vgchange` command, take note of what the volume group is called. Substitute the correct info into this next command. Make sure that `-root` is added to the end of the volume group name:
238
295
239
296
```bash
240
-
foriin dev dev/pts proc sys run;do sudo mount -B /$i /mnt/$i;done
Now the existing hard drive can be accessed by going to the `/mnt` folder. To use the <u>Files</u> program, go to `+ Other Locations` -> `Computer` and then click on the `/mnt` folder.
301
+
248
302
As your system reboots, remove the disk when prompted. The computer should now boot normally.
0 commit comments