Autosave: 2024-05-06 13:20:05
This commit is contained in:
parent
dc9fcbbd6d
commit
7eb7713b37
2 changed files with 9 additions and 15 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
|
@ -1,15 +1,13 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- disks
|
- disks
|
||||||
---
|
---
|
||||||
|
|
||||||
# Disk partitions
|
# Linux disk partitions
|
||||||
|
|
||||||
A disk is divided up into [partitions](Partitions.md)
|
A disk is divided up into partitions which are subsections of the overall disk.
|
||||||
which are subsections of the overall disk. The kernel presents each partition as
|
The kernel presents each partition as a [block device](Devices.md#Devices) as it
|
||||||
a [block device](Devices.md#Devices) as it would with an
|
would with an entire disk.
|
||||||
entire disk.
|
|
||||||
|
|
||||||
The disk dedicates a small part of its contents to a **partition table**: this
|
The disk dedicates a small part of its contents to a **partition table**: this
|
||||||
defines the different partitions that comprise the total disk space.
|
defines the different partitions that comprise the total disk space.
|
||||||
|
@ -77,10 +75,9 @@ The two tools disclose that the main harddrive is `/dev/nvme0n1` (equivalent to
|
||||||
starts. This is where your bootloader is stored and that will be accessed by
|
starts. This is where your bootloader is stored and that will be accessed by
|
||||||
the BIOS. In Linux this will be GRUB.
|
the BIOS. In Linux this will be GRUB.
|
||||||
- Root dir (`/dev/nvme0n1p2`)
|
- Root dir (`/dev/nvme0n1p2`)
|
||||||
- This is the domain of the
|
- This is the domain of the [superuser](User_Space.md#root-user-superuser).
|
||||||
[superuser](User_Space.md#root-user-superuser). The part
|
The part of the filesystem that you need sudo priveleges to access and where
|
||||||
of the filesystem that you need sudo priveleges to access and where you
|
you manage users
|
||||||
manage users
|
|
||||||
- Home dir (`/dev/nvme0n1p3`)
|
- Home dir (`/dev/nvme0n1p3`)
|
||||||
- The domain of the user(s)
|
- The domain of the user(s)
|
||||||
|
|
||||||
|
@ -173,13 +170,9 @@ umount /dev/sda2
|
||||||
```bash
|
```bash
|
||||||
# Load the disk into fdisk
|
# Load the disk into fdisk
|
||||||
$ sudo fdisk /dev/sda
|
$ sudo fdisk /dev/sda
|
||||||
|
|
||||||
# Select delete and run for each partition
|
|
||||||
Command (m for help): d
|
Command (m for help): d
|
||||||
Partition number (1,2, default 2): 1
|
Partition number (1,2, default 2): 1
|
||||||
|
|
||||||
Partition 1 has been deleted.
|
Partition 1 has been deleted.
|
||||||
|
|
||||||
Command (m for help): d
|
Command (m for help): d
|
||||||
Selected partition 2
|
Selected partition 2
|
||||||
Partition 2 has been deleted.
|
Partition 2 has been deleted.
|
||||||
|
@ -199,6 +192,7 @@ w
|
||||||
|
|
||||||
# Check execution:
|
# Check execution:
|
||||||
$ lsblk
|
$ lsblk
|
||||||
|
|
||||||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
|
||||||
sda 8:0 0 465.7G 0 disk
|
sda 8:0 0 465.7G 0 disk
|
||||||
```
|
```
|
||||||
|
@ -255,7 +249,7 @@ Calling ioctl() to re-read partition table.
|
||||||
Syncing disks.
|
Syncing disks.
|
||||||
```
|
```
|
||||||
|
|
||||||
We can now confirm out new partitions:
|
We can now confirm our new partitions:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ lsblk
|
$ lsblk
|
Loading…
Add table
Reference in a new issue