Partitioning Instructions for CLI, and fix numbers on partitioning instructions for GUI

This commit is contained in:
Out Of Ideas 2024-01-27 12:47:25 -06:00
parent 50fb200e33
commit 0a10a76f31

242
README.md
View file

@ -127,7 +127,218 @@ ls -d /sys/firmware/efi
If directory exists (the output will not be an error), then your system is UEFI. If it does not exist, then your system is Legacy BIOS. Make sure that you typed it correctly.
You will need to know this for disk partitioning later on.
## Running the installer
From now on, follow the CLI or GUI installation guide.
## CLI
### Partitioning the Disk
#### UEFI
Recall the name of the disk that you want to install to, and run:
```
fdisk <disk name>
```
Replace **\<disk name\>** with the actual name of the drive; eg. `/dev/sda`.
You should now be greeted with some information, and a prompt that looks like this: `Command (m for help): `.
Type **p**, and press **Enter**. This will print out the information about the disk that you are writing to:
```
Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 21AAD8CF-DB67-0F43-9374-416C7A4E31EA
<!--T:194-->
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G EFI System
/dev/sda2 2099200 10487807 8388608 4G Linux swap
/dev/sda3 10487808 60549119 50061311 23.9G Linux filesystem
```
*Example outputs may be copied from the* [Gentoo wiki](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks)*.*
Run this periodically throughout the partitioning process, especially before writing changes.
If the GPT disklabel already exists (as seen in the example output of **p**), repeatedly run **d** to delete the existing partitions.
If the disklabel does not exist, run **g** to create the GPT disklabel. *For Legacy BIOS you would create the MBR disklabel.*
```
Created a new GPT disklabel (GUID: 87EA4497-2722-DF43-A954-368E46AE5C5F).
```
Create the ESP partition which stands for EFI System Partition. This is where the boot loader and other UEFI firmware is loaded during the bootstrapping process. The partition should be small (200 MiB - 1 GiB). I recommend 512 MiB, to be safe. Press **n**, **Enter**, **Enter**, **Enter**, **+512M**, **Enter** to create a new partition.
```
Command (m for help): n
Partition number (1-128, default 1): 1
First sector (2048-60549086, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-60549086, default 60549086): +512M
Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB.
```
Now would be a good time to run **p**, and print the changes. Keep in mind that the disk wont be touched until the changes are writen.
Now make the partition an ESP (**t**, **1**, **1**):
```
Command (m for help): t
Selected partition 1
Partition type (type L to list all types): 1
Changed type of partition 'Linux filesystem' to 'EFI System'.
```
Next, create a SWAP partition. I recommend making it 4 GiB. Here is a [chart](https://docs.voidlinux.org/installation/live-images/partitions.html#swap-partitions) explaining the amount of SWAP that should be added based on the amount of RAM that the system has. If you don't know how much RAM the system has, just guess. If the system is slow, you should probably do 8 GiB of SWAP.
```
Command (m for help): n
Partition number (2-128, default 2):
First sector (526336-60549086, default 526336):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (526336-60549086, default 60549086): +4G
Created a new partition 2 of type 'Linux filesystem' and of size 4 GiB.
```
And now make it a SWAP partition (**t**, **2**, **19**):
```
Command (m for help): t
Partition number (1,2, default 2): 2
Partition type (type L to list all types): 19
Changed type of partition 'Linux filesystem' to 'Linux swap'.
```
Finally, make a root partition. This will take up the rest of the disk.
```
Command (m for help): n
Partition number (3-128, default 3): 3
First sector (10487808-60549086, default 10487808):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-60549086, default 60549086):
Created a new partition 3 of type 'Linux filesystem' and of size 23.9 GiB.
```
It is a good idea to change the type of the partition.
```
Command(m for help): t
Partition number (1-3, default 3): 3
Partition type or alias (type L to list all): 23
Changed type of partition 'Linux filesystem' to 'Linux root (x86-64)'
```
Print the changes. It should look something like this (the sizes will not be exactly the same):
```
Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 87EA4497-2722-DF43-A954-368E46AE5C5F
Device Start End Sectors Size Type
/dev/sda1 2048 526335 524288 1G EFI System
/dev/sda2 526336 8914943 8388608 4G Linux swap
/dev/sda3 8914944 60549086 51634143 24.6G Linux root (x86-64)
```
When you are ready, write the changes, and you will be regreeted with the `# `.
```
Command (m for help): w
```
Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.
#### Legacy BIOS
Recall the name of the disk that you want to install to, and run:
```
fdisk <disk name>
```
Replace **\<disk name\>** with the actual name of the drive; eg. `/dev/sda`.
You should now be greeted with some information, and a prompt that looks like this: `Command (m for help): `.
Type **p**, and press **Enter**. This will print out the information about the disk that you are writing to:
```
Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 21AAD8CF-DB67-0F43-9374-416C7A4E31EA
Device Start End Sectors Size Type
/dev/sda1 2048 526335 524288 1G EFI System
/dev/sda2 526336 2623487 2097152 1G Linux swap
/dev/sda3 2623488 19400703 16777216 8G Linux filesystem
/dev/sda4 19400704 60549086 41148383 19.6G Linux filesystem
```
*Example outputs may be copied from the* [Gentoo wiki](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks)*.*
Run this periodically throughout the partitioning process, especially before writing changes.
If the MBR disklabel already exists (look at the `Disklabel type:` section of your last output), repeatedly run **d** to delete the existing partitions.
If it is not MBR, or does not yet exist, enter **o** to create the MBR (also known as DOS) disklabel. *UEFI generally uses GPT.*
```
Command (m for help): o
Created a new DOS disklabel with disk identifier 0xe04e67c4.
The device contains 'gpt' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
```
Create the boot partition. The partition should be small (200 MiB - 1 GiB MiB). I recommend 512 MiB, to be safe. Press **n**, **Enter**, **Enter**, **Enter**, **+512M**, **Enter** to create a new partition.
Next create a SWAP partition. I recommend making it 4 GiB. Here is a [chart](https://docs.voidlinux.org/installation/live-images/partitions.html#swap-partitions) explaining the amount of SWAP that should be added based on the amount of RAM that the system has. If you don't know how much RAM the system has, just guess. If the system is slow, you should probably do 8 GiB of SWAP.
Press **n**, **Enter**, **Enter**, **+4G**:
```
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-60549119, default 0):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-60549119, default 60549119): +4G
Created a new partition 1 of type 'Linux' and of size 4 GiB.
```
And now make it a SWAP partition (**t**, **2**, **82**):
```
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 82
<!--T:179-->
Changed type of partition 'Linux' to 'Linux swap / Solaris'.
```
Next, make a root partition. This will take up the rest of the disk.
```
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (8390656-60549086, default 8390656):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (8390656-60549086, default 60549086):
Created a new partition 2 of type 'Linux' and of size 23.9 GiB.
```
Print the changes. It should look something like this (the sizes will not be exactly the same):
```
Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe04e67c4
Device Boot Start End Sectors Size Id Type
/dev/sda2 2048 8390654 8388606 4G 82 Linux
/dev/sda3 8390655 60549119 52158464 25.6G 83 Linux
```
When you are ready, write the changes, and you will be regreeted with the `# `.
```
Command (m for help): w
```
Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.
## GUI
### Running the installer
Running the installer is simple.
```sh
void-installer
@ -233,11 +444,11 @@ Now select the disk that you want to partition. This is the disk that you are go
Now select **fdisk**. This guide provides instructions on how to use `fdisk`. If you are familiar with partitioning, then you can use `cfdisk`.<br />
![image of the "select fdisk"](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/select-fdisk.png)
## Partitioning the Disks
### Partitioning the Disks
Here is additional information on partitioning: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks
From the rest of this section, follow the instructions for firmware type UEFI or Legacy BIOS.
### UEFI
#### UEFI
You should now be greeted with some information, and a prompt that looks like this: `Command (m for help): `.
Type **p**, and press **Enter**. This will print out the information about the disk that you are writing to:
@ -319,7 +530,7 @@ When you are ready, write the changes.
Command (m for help): w
```
Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.
### Legacy BIOS
#### Legacy BIOS
You should now be greeted with some information, and a prompt that looks like this: `Command (m for help): `.
Type **p**, and press **Enter**. This will print out the information about the disk that you are writing to:
@ -375,11 +586,11 @@ Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (3-4, default 3): 3
First sector (10487808-60549086, default 10487808):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-60549086, default 60549086):
Partition number (2-4, default 2): 2
First sector (8390656-60549086, default 8390656):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (8390656-60549086, default 60549086):
Created a new partition 3 of type 'Linux' and of size 23.9 GiB.
Created a new partition 2 of type 'Linux' and of size 23.9 GiB.
```
Print the changes. It should look something like this (the sizes will not be exactly the same):
```
@ -401,14 +612,14 @@ When you are ready, write the changes.
Command (m for help): w
```
Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.
## Back to the GUI
### Back to the GUI
Next step is to create the file systems.
Now select **FileSystems**.<br />
![image of "select FileSystems"](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/select-filesystems.png)
Now create the filesystems. Follow the directions dedicated to your firmware (UEFI/LegacyBIOS).
### UEFI
#### UEFI
For UEFI, the first partition, should be vfat, the second partition should be SWAP, and the third partition should be some sort of Linux file system.
Select the first partition.<br />
@ -437,7 +648,7 @@ Now select any Linux filesystem. This could be Ext4, BTRFS, or XFS. It doesn't r
Type `/` as the mountpoint.<br />
![image of /](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/root-mountpoint.png)
### Legacy BIOS
#### Legacy BIOS
Select the second partition.<br />
![image of second partition](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/second-legacy-bios-partition.png)
@ -455,7 +666,7 @@ Now select any Linux filesystem. This could be Ext4, BTRFS, or XFS. It doesn't r
Type `/` as the mountpoint.<br />
![image of /](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/legacy-bois-root-mountpoint.png)
### UEFI and BIOS
#### UEFI and BIOS
Select **Install**.<br />
![image of "select Install"](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/select-install.png)
@ -463,7 +674,7 @@ While the process is running check tty8 to see a verbose output (**Ctrl** + **Al
**Do not reboot**, unless you chose the grub bootloader. If you chose the grub bootloader, reboot, and skip the next section.<br />
![image of reboot](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/reboot.png)
## Installing a Different Bootloader
### Installing a Different Bootloader
If you are installing a different bootloader, say "no" to the reboot prompt.<br />
![image of don't reboot](https://git.disroot.org/oink/Grandma/raw/branch/main/Assests/Images/dont-reboot.png)
@ -502,7 +713,7 @@ Update the package manager.
```sh
xbps-install -u xbps
```
### UEFI
#### UEFI
Install a terminal text editor of choice
```sh
xbps-install -S vis
@ -528,7 +739,7 @@ Now reboot.
```
reboot
```
### Legacy BIOS
#### Legacy BIOS
Now install Git and LILO.
```sh
xbps-install -S git lilo
@ -607,6 +818,7 @@ Now enable LILO.
```
lilo
```
# Post Insallation
## Logging in
Login as root with the root password.