Advertisement
ficus

sd_fusing working with fs starting at sector 8192

Aug 26th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. dd if=/dev/zero of=/dev/sdd bs=1M count=8
  2. 8+0 records in
  3. 8+0 records out
  4. 8388608 bytes (8.4 MB, 8.0 MiB) copied, 1.44513 s, 5.8 MB/s
  5. [root@yogi ~]# fdisk /dev/sdd
  6.  
  7. Welcome to fdisk (util-linux 2.28).
  8. Changes will remain in memory only, until you decide to write them.
  9. Be careful before using the write command.
  10.  
  11. Device does not contain a recognized partition table.
  12. Created a new DOS disklabel with disk identifier 0x1fc3e878.
  13.  
  14. Command (m for help): o
  15. Created a new DOS disklabel with disk identifier 0xd9897a4f.
  16.  
  17. Command (m for help): n
  18. Partition type
  19. p primary (0 primary, 0 extended, 4 free)
  20. e extended (container for logical partitions)
  21. Select (default p): p
  22. Partition number (1-4, default 1):
  23. First sector (2048-31116287, default 2048): 8192
  24. Last sector, +sectors or +size{K,M,G,T,P} (8192-31116287, default 31116287):
  25.  
  26. Created a new partition 1 of type 'Linux' and of size 14.9 GiB.
  27.  
  28. Command (m for help): w
  29. The partition table has been altered.
  30. Calling ioctl() to re-read partition table.
  31. Syncing disks.
  32.  
  33. [root@yogi ~]# mkfs.ext4 /dev/sdd1
  34. mke2fs 1.42.13 (17-May-2015)
  35. Creating filesystem with 3888512 4k blocks and 972944 inodes
  36. Filesystem UUID: 6b6412cd-c773-4f28-a606-d3a7c39f246d
  37. Superblock backups stored on blocks:
  38. 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
  39.  
  40. Allocating group tables: done
  41. Writing inode tables: done
  42. Creating journal (32768 blocks): done
  43. Writing superblocks and filesystem accounting information: done
  44.  
  45. [root@yogi ~]# mount /dev/sdd1 root/
  46. [root@yogi ~]# !bsdtar
  47. bsdtar -xpf ArchLinuxARM-odroid-xu3-latest.tar.gz -C root/
  48. [root@yogi ~]# sync
  49. *[root@yogi ~]# cd root/boot/
  50. [root@yogi boot]# ./sd_fusing.sh /dev/sdd
  51. /dev/sdd reader is identified.
  52. BL1 fusing
  53. 30+0 records in
  54. 30+0 records out
  55. 15360 bytes (15 kB, 15 KiB) copied, 0.0481267 s, 319 kB/s
  56. BL2 fusing
  57. 28+1 records in
  58. 28+1 records out
  59. 14592 bytes (15 kB, 14 KiB) copied, 0.382876 s, 38.1 kB/s
  60. u-boot fusing
  61. 1061+1 records in
  62. 1061+1 records out
  63. 543414 bytes (543 kB, 531 KiB) copied, 4.23891 s, 128 kB/s
  64. TrustZone S/W fusing
  65. 512+0 records in
  66. 512+0 records out
  67. 262144 bytes (262 kB, 256 KiB) copied, 1.98698 s, 132 kB/s
  68. U-boot image is fused successfully.
  69. [root@yogi boot]# cd
  70. [root@yogi ~]# umount root
  71. [root@yogi ~]# fsck.ext4 -fn /dev/sdd1
  72. e2fsck 1.42.13 (17-May-2015)
  73. Pass 1: Checking inodes, blocks, and sizes
  74. Pass 2: Checking directory structure
  75. Pass 3: Checking directory connectivity
  76. Pass 4: Checking reference counts
  77. Pass 5: Checking group summary information
  78. /dev/sdd1: 31076/972944 files (0.5% non-contiguous), 256788/3888512 blocks
  79. [root@yogi ~]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement