Portable usb drive

From campisano.org
Jump to navigation Jump to search

NOTE: assuming that your drive device is /dev/sdX

  • clean MBR
dd if=/dev/zero of=/dev/sdX bs=512 count=1
  • create a portable partition
fdisk -c=nondos -u=sectors -n /dev/sdX
o       ## create an empty DOS partition table
n       ## new
p       # primary
1       # partition 1
[enter] # default, start at initial disk
[enter] # all remaining space
t       # type of the unique existent partition
c       # W95 FAT32 (LBA) partition up to 2Tb size
p       ## print new future partition, check if is equal to below description
w       ## WRITE CHANGES AND EXIT
  • format with a portable filesystem
mkfs.vfat -n YOUR_LABEL -F 32 /dev/sdX1