chris41g

FormatRFS

May 10th, 2011
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.01 KB | None | 0 0
  1. #!/sbin/sh
  2. #
  3. # This program is free software; you can redistribute it and/or modify it
  4. # under the terms of the GNU Library General Public License as published
  5. # by the Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. #
  13. # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
  14. #
  15. mount /dev/block/mmcblk0p1 /sdcard
  16. exec >> /sdcard/install.log 2>&1
  17. date
  18. echo ***************Log Start***************
  19. # unmount partitions
  20. echo *********Begining Formatting RFS option chosen***********
  21. echo ***************Unmounting Drives***************
  22.  
  23. #umount -a -t rfs
  24. #umount -a -t ext4
  25. #mount -o remount,rw rootfs /
  26. cat /proc/mounts # > /etc/mtab
  27. #mount -o remount,ro rootfs /
  28. #cat /etc/mtab
  29. echo ***************Drives Unmounted***************
  30. # System partition
  31. echo ***************Begin System Partition***************
  32. /tmp/busybox umount -l /system
  33. /sbin/dd if=/dev/zero of=/dev/block/stl9 bs=4096 count=2560
  34. /tmp/fat.format -S 4096 -s 1 -F 32 /dev/block/stl9
  35. /tmp/busybox mount -t rfs -o check=no /dev/block/stl9 /system
  36. echo ***************System Partition Done***************
  37. # Cache partition
  38. echo ***************Begin Cache Partition***************
  39. /tmp/busybox umount -l /cache
  40. /tmp/fat.format -S 4096 -s 1 -F 16 /dev/block/stl11
  41. /tmp/busybox mount -t rfs -o nosuid,nodev,check=no /dev/block/stl11 /cache
  42. echo ***************Cache Partition Done***************
  43. # Data partition
  44. echo ***************Begin Data Partion***************
  45. /tmp/busybox umount -l /data
  46. /tmp/fat.format -S 4096 -s 1 -F 32 /dev/block/stl10
  47. /tmp/busybox mount -t rfs -o nosuid,nodev,check=no /dev/block/stl10 /data
  48. sync
  49. echo ***************Data Partion Done***************
  50. echo ***************Finished Formatting Partions***************
Advertisement
Add Comment
Please, Sign In to add comment