Initializing Hard Drive - Linux: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
To view all disks | To view all disks | ||
<pre>lsblk</pre> | <pre>lsblk</pre> | ||
Creating a File System | |||
<pre>sudo mkfs.ext4 -L media /dev/sdb1</pre> |
Revision as of 22:08, 29 November 2020
Use fdisk to identify new hard drive (use sudo or root)
fdisk -l
For larger disks, make sure the partition table is gpt (vs mbr). This allows for larger and more partitions. To do this:
Using GParted, you can do this by going into Device->Create Partition Table and select "gpt" from the list.
Or parted
sudo aptitude install parted parted /dev/sdb print mklabel gpt mkpart primary ext4 0% 100%
To view all disks
lsblk
Creating a File System
sudo mkfs.ext4 -L media /dev/sdb1