Last active
December 17, 2015 05:49
-
-
Save TacoSteemers/5560959 to your computer and use it in GitHub Desktop.
Partitioning and mounting a disk on a Debian system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is present? | |
$ fdisk -l | |
To edit the partitions on /dev/sdz: | |
$ fdisk /dev/sdz | |
Follow the instructions. | |
Remove the partitions you want to remove, create new ones in their place. | |
Make sure to verify and write. | |
Then, update the kernel: | |
$ partprobe /dev/sdz | |
Then, create the filesystem(s): | |
$ mkfs.ext4 /dev/sdz1 | |
Then, mount: | |
$ mkdir /media/volz1 | |
$ mount -t ext4 /dev/sdz1 /media/volz1 | |
Add a line like the following to fstab to let it be automounted: | |
/dev/sdz1 /media/volz1 ext4 defaults 0 2 # 2 for quick fs check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note on external disk drive carriers:
Not that you with some drive carriers you can not properly partition or format a large disk drive. It is possible that you will end up with a smaller partition than you had hoped for. If that is the case, you will have to mount it internally instead.