Add new usb disk as ext4: Difference between revisions

From Andreida
(Created page with "search for the disk: fdisk -l create a partition on it: fdisk /dev/sdx <--- change x to a,b,c or whatever p - print the partition table d - delete the current partitions...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:
format the partition:
format the partition:
mkfs.ext4 /dev/sdx5
mkfs.ext4 /dev/sdx5

find the uuid:
ls -l /dev/disk/by-uuid/

prepare the mount in /etc/fstab
UUID=8c0a96a2-4949-4b2c-888f-fa5c5507754e /mnt/backup ext4 rw,relatime,data=ordered 0 0

mount it
mount /mnt/backup

Latest revision as of 02:26, 25 February 2016

search for the disk:

fdisk -l

create a partition on it:

fdisk /dev/sdx   <--- change x to a,b,c or whatever
p - print the partition table
d - delete the current partitions
m - menu
n - new partition -> extended 
n - new partition -> logical
w - write changes to disk

look at your new partitions:

fdisk -l

format the partition:

mkfs.ext4 /dev/sdx5

find the uuid:

ls -l /dev/disk/by-uuid/

prepare the mount in /etc/fstab

UUID=8c0a96a2-4949-4b2c-888f-fa5c5507754e /mnt/backup ext4  rw,relatime,data=ordered 0 0

mount it

mount /mnt/backup