Advertisement
adde88

format_usb (pineapple)

Jan 9th, 2018
1,163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. #2018 - Zylla - (adde88@gmail.com)
  3.  
  4. [[ -f /tmp/usb_format.progress ]] && {
  5.   exit 0
  6. }
  7.  
  8. touch /tmp/usb_format.progress
  9.  
  10. umount /sd
  11. swapoff /dev/sdb2
  12.  
  13. sleep 2
  14. cat /pineapple/modules/Advanced/formatSD/fdisk_options | fdisk /dev/sdb
  15. sleep 2
  16.  
  17. umount /sd
  18. mkfs.ext4 /dev/sdb1
  19. sleep 2
  20.  
  21. mkfs.ext4 /dev/sdb2
  22. mkswap /dev/sdb2
  23.  
  24. mount /dev/sdb1 /sd
  25. swapon /dev/sdb2
  26.  
  27. rm /tmp/usb_format.progress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement