linux:misc:partition_create

Create partition and assign uuid

# create partition
$ sudo fdisk /dev/sdb
m
w
 
# make filesystem
$ sudo mkfs.ext4 /dev/sdb1
 
# generate uuid
$ uuidgsudo en
5cf9e7ae-a4ba-4d2b-8146-da3a207fbab5
 
# assign uuid to partition
$ sudo tune2fs /dev/sdb1 -U 5cf9e7ae-a4ba-4d2b-8146-da3a207fbab5
 
# check partitions ids
$ blkid /dev/sdb1
/dev/sdb1: UUID="5cf9e7ae-a4ba-4d2b-8146-da3a207fbab5" TYPE="ext4" PARTUUID="2c6a7a3a-01"
 
# now, you can mount int in fstab
/dev/disk/by-uuid/5cf9e7ae-a4ba-4d2b-8146-da3a207fbab5 /shared ext4 defaults,noacl 0 0
Enter your comment:
G J H G᠎ S
 
  • linux/misc/partition_create.txt
  • Last modified: 2021-04-02 11:01
  • by tplecko