Skip to content

Instantly share code, notes, and snippets.

@chankruze
Last active November 6, 2019 23:24
Show Gist options
  • Save chankruze/a379b5c4922c7ed24489d7d6080c4ff8 to your computer and use it in GitHub Desktop.
Save chankruze/a379b5c4922c7ed24489d7d6080c4ff8 to your computer and use it in GitHub Desktop.

Erase

sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync

Create Partition Table

sudo fdisk /dev/sdb

Then press lettero to create a new empty DOS partition table.

Create a new partition

  • Press letter n to add a new partition. You will be prompted for the size of the partition. Making a primary partition when prompted, if you are not sure.
  • Then press letter w to write table to disk and exit.

Format new partition

See what is your new partition with a command lsblk In my case it is /dev/sdb1

sudo mkfs.vfat /dev/sdb1
sudo eject /dev/sdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment