Guest User

preparing SD image for McBin

a guest
Jun 16th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. root@localhost:~# fdisk /dev/mmcblk0
  2.  
  3. Welcome to fdisk (util-linux 2.25.2).
  4. Changes will remain in memory only, until you decide to write them.
  5. Be careful before using the write command.
  6.  
  7. Device does not contain a recognized partition table.
  8. Created a new DOS disklabel with disk identifier 0xed009b1e.
  9.  
  10. Command (m for help): n
  11. Partition type
  12. p primary (0 primary, 0 extended, 4 free)
  13. e extended (container for logical partitions)
  14. Select (default p): p
  15. Partition number (1-4, default 1): 1
  16. First sector (2048-15523839, default 2048): 4096
  17. Last sector, +sectors or +size{K,M,G,T,P} (4096-15523839, default 15523839): +32M
  18.  
  19. Created a new partition 1 of type 'Linux' and of size 32 MiB.
  20.  
  21. Command (m for help): p
  22. Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
  23. Units: sectors of 1 * 512 = 512 bytes
  24. Sector size (logical/physical): 512 bytes / 512 bytes
  25. I/O size (minimum/optimal): 512 bytes / 512 bytes
  26. Disklabel type: dos
  27. Disk identifier: 0xed009b1e
  28.  
  29. Device Boot Start End Sectors Size Id Type
  30. /dev/mmcblk0p1 4096 69631 65536 32M 83 Linux
  31.  
  32.  
  33. Command (m for help): n
  34. Partition type
  35. p primary (1 primary, 0 extended, 3 free)
  36. e extended (container for logical partitions)
  37. Select (default p): p
  38. Partition number (2-4, default 2): 2
  39. First sector (2048-15523839, default 2048): 69631
  40.  
  41. Sector 69631 is already allocated.
  42. First sector (69632-15523839, default 69632): ^C
  43. root@localhost:~#
  44. root@localhost:~#
  45. root@localhost:~#
  46. root@localhost:~#
  47. root@localhost:~#
  48. root@localhost:~#
  49. root@localhost:~#
  50. root@localhost:~# fdisk /dev/mmcblk0
  51.  
  52. Welcome to fdisk (util-linux 2.25.2).
  53. Changes will remain in memory only, until you decide to write them.
  54. Be careful before using the write command.
  55.  
  56. Device does not contain a recognized partition table.
  57. Created a new DOS disklabel with disk identifier 0xb3fb4355.
  58.  
  59. Command (m for help): n
  60. Partition type
  61. p primary (0 primary, 0 extended, 4 free)
  62. e extended (container for logical partitions)
  63. Select (default p): p
  64. Partition number (1-4, default 1): 1
  65. First sector (2048-15523839, default 2048): 4096
  66. Last sector, +sectors or +size{K,M,G,T,P} (4096-15523839, default 15523839): +32M
  67.  
  68. Created a new partition 1 of type 'Linux' and of size 32 MiB.
  69.  
  70. Command (m for help): p
  71. Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
  72. Units: sectors of 1 * 512 = 512 bytes
  73. Sector size (logical/physical): 512 bytes / 512 bytes
  74. I/O size (minimum/optimal): 512 bytes / 512 bytes
  75. Disklabel type: dos
  76. Disk identifier: 0xb3fb4355
  77.  
  78. Device Boot Start End Sectors Size Id Type
  79. /dev/mmcblk0p1 4096 69631 65536 32M 83 Linux
  80.  
  81.  
  82. Command (m for help): n
  83. Partition type
  84. p primary (1 primary, 0 extended, 3 free)
  85. e extended (container for logical partitions)
  86. Select (default p): p
  87. Partition number (2-4, default 2): 2
  88. First sector (2048-15523839, default 2048): 69632
  89. Last sector, +sectors or +size{K,M,G,T,P} (69632-15523839, default 15523839):
  90.  
  91. Created a new partition 2 of type 'Linux' and of size 7.4 GiB.
  92.  
  93. Command (m for help): w
  94. The partition table has been altered.
  95. Calling ioctl() to re-read partition table.
  96. Syncing disks.
  97.  
  98. root@localhost:~# ls /dev/mmcblk0*
  99. /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2
  100. sync@localhost:~# dd if=flash-image-a80x0_mcbin.bin of=/dev/mmcblk0p1 conv=fdata
  101. 1798+1 records in
  102. 1798+1 records out
  103. 921048 bytes (921 kB) copied, 0.67439 s, 1.4 MB/s
  104. root@localhost:~# mkfs.vfat /dev/mmcblk0p2
  105. mkfs.fat 3.0.27 (2014-11-12)
  106. root@localhost:~#
Advertisement
Add Comment
Please, Sign In to add comment