Comptia Linux+ Formatting Partition Check
-
Hi there,
Is there a way for me to check if a disk is formatted?Just asking this question as when we do fdisk or gdisk to create partitions, it creates the partitions and the filesystem type that we want it to be but it doesn't say if we have formatted the disk.
I've encountered this issue when I tried to mount the filesystem (after partitioning and no formatting done) and an error was produced. (using the virtual labs)
Using commands for fdisk or gdisk or lsblk -f does not indicate that if the newly created partition is formatted.
Regards
-
I'm not sure what you are seeing on your end, but lsblk should be the right tool for what you want. It will list all of your storage devices regardless of whether they are mounted or not, and will detect the file system on the disk if one is present. Here is example output for lsblk -f:
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT sda ├─sda1 vfat system-boot 4D3B-86C0 133.2M 47% /boot/firmware └─sda2 ext4 writable 79af43d1-801b-4c28-81d5-724c930bcc83 871G 1% / sdb ├─sdb1 ext4 e8a9ebae-3bba-4412-93cf-139104a0312d ├─sdb2 └─sdb3 vfat 10AA-5A54 6.5G 0% /mnt/transfer
Here, I can see sdb1 is formatted ext4 but not mounted. sdb2 is not formatted, and sdb3 is formatted FAT32 and mounted.
-
Thanks for replying. Yea I might have made a mistake during partitioning disk