After deleting the partitions from a USB stick and then re-inserting the disk I see the following from dmesg
:
[99341.658055] sd 4:0:0:0: [sdb] 15771720 512-byte logical blocks: (8.07 GB/7.52 GiB)
[99341.658670] sd 4:0:0:0: [sdb] Write Protect is off
[99341.658678] sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
[99341.658684] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[99341.668175] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[99341.668187] sdb
Now how do I create a partition /dev/sdb1 of the full size of the disk from the command line?
fdisk
and parted
ask stupid questions like the start and end of partition. I want the partition simply to full the entire disk. Most people I know resort to using gparted
, which I don't want. I just want a simple one liner to create a full sized partition.
The next command I probably want to run after creating the partition is mkfs.ext4 /dev/sdb1
.