BASH   72

broken usb

Guest on 2nd June 2022 08:36:49 AM

  1. sudo fdisk /dev/sdX
  2.  
  3. d[, d, ..., d] # delete
  4.  
  5. w # write
  6.  
  7. $ sudo fdisk /dev/sdX # or r, zsh's built-in repeat command command
  8.  
  9. n # new; they incorrectly (?) say N in tutorial, which doesn't work
  10.  
  11. p # primary
  12.  
  13. 1 # partition number
  14.  
  15. RET RET # default start and end sector numbers
  16.  
  17. w
  18.  
  19. $ sudo partprobe # tell kernel of table changes; no reboot needed
  20.  
  21. $ sudo mkfs.vfat -F 32 /dev/sdX1 # err, make fs :)

Raw Paste


Login or Register to edit or fork this paste. It's free.