24 lines
No EOL
830 B
Markdown
24 lines
No EOL
830 B
Markdown
# Adding a new disk to debian
|
|
|
|
I'm adding a new HDD to Frankie, so I'll take the chances to note down the process for future disk additions.
|
|
|
|
First, let's find the disk. It should appear in the list of existing disks by running:
|
|
|
|
```bash
|
|
sudo fdisk -l
|
|
```
|
|
|
|
It should show with an id such as `/dev/sda`. If the disk is new, it won't show any partitions.
|
|
|
|
To create a new partition, run `fdisk <id of the disk>`. For example, `fdisk /dev/sda`.
|
|
|
|
Then click `n` to create a new partition, `p` for primary, a number, and set the size (just press enter to use all
|
|
available space).
|
|
|
|
Finally, you can use `p` to check the final state and `w` to confirm the changes and write them to disk.
|
|
|
|
If you want to format the disk as `ext4`, you can run:
|
|
|
|
`sudo mkfs -t ext4 <id of the partition>`
|
|
|
|
You can check the final result with `lsblk -f.` |