I ran the foll. command:
parted /dev/sdb
(parted) p
mkpart primary 1GB 1.5GB
The parted command (when I print the details) outputs something like below:
1 2048MB .......
what I want to bring in your notice that only 1 row came showing the complete size of the disk (detachable device) although I created 2 partitions with fdisk command.
The output of the below differs from above
fdisk /dev/sdb
(....): p
It outputs 2 rows as I created 2 partitions. Why then parted command doesn't show it and shows the total size of the disk.
My other question :
When I put a fresh pendrive (without partitioning) it shows as one. (I mean it doesn't show that there are any partitions as I havent created any which is fine). Now when I create a partition say /dev/sdb1 (of /dev/sdb) then the output of fdisk shows sdb1. What about the remaining space. Now after creating a partition (sdb1), why then only sdb1 can be mounted and not the other part. Because earlier when there was no partition , it had mounted the complete disk.