sd card

来源:互联网 发布:java和js对象的区别 编辑:程序博客网 时间:2024/04/29 14:13

New situation:Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0   Device Boot Start   End    MiB    #blocks   Id  System/dev/sdb1         7+    21-    15-     14942   83  Linux/dev/sdb2        21+    36-    15-     14942   83  Linux/dev/sdb3        36+  2042-  2007-   2054525    5  Extended/dev/sdb4      2042+  4049-  2007-   2054525   83  Linux/dev/sdb5        36+   554-   519-    530440+  83  Linux/dev/sdb6       554+  1072-   519-    530440+  83  Linux/dev/sdb7      1072+  1087-    15-     14941+  83  Linux/dev/sdb8      1087+  1101-    15-     14941+  83  LinuxWarning: no primary partition is marked bootable (active)



 

echo "--------------1--u-boot-no-padding.bin --------------"sudo dd if=1.txt of=/dev/sdb bs=1K seek=1echo "Download the boot.img :" sudo dd if=2.txt of=/dev/sdb1 echo "Download the system.img :"sudo dd if=3.txt of=/dev/sdb5echo "Download the recovery.img:"sudo dd if=4.txt of=/dev/sdb2sync



0X200 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x247ae00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x15e3400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


所以我认为是这一条指令有错误:

sfdisk --force -uM ${node} -N1 << EOF
${BOOTLOAD_RESERVE},${BOOT_ROM_SIZE},83
EOF

---------------------------------------------------------------------------------------------------

这里是原卡的分区,测试:

0X76AC00 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x2515e00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x1640400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


   Device Boot Start     End   #cyls    #blocks   Id  System/dev/sdb1          1       2       2      15190   83  Linux/dev/sdb2          3       4       2      15190   83  Linux/dev/sdb3          5     254     250    1898750    5  Extended/dev/sdb4        255    1025     771    5855745    b  W95 FAT32/dev/sdb5          5+     74      70-    531649+  83  Linux/dev/sdb6         75+    109      35-    265824+  83  Linux/dev/sdb7        110+    248     139-   1055704+  83  Linux/dev/sdb8        249+    250       2-     15189+  83  Linux/dev/sdb9        251+    252       2-     15189+  83  Linux



--------------------------------------------------------------------------------------------------

这里是使用jb4.2里面的脚本分区的情况,测试:

0X74BC00 : 22222222222222  

0X400 : 111111            这个对应db1  ,这个位置是对的.

0x247ae00 :33333333333          //这里对于db5 ,也是对的,地址是36mb多一点

0x15e3400 :444444444444444444444    //这里对应db2 ,也是对的.对应21mb多一点


   Device Boot Start     End   #cyls    #blocks   Id  System/dev/sdb1          1       2       2      14942   83  Linux/dev/sdb2          3       4       2      14942   83  Linux/dev/sdb3          5     153     149    1113179    5  Extended/dev/sdb4        154    1030     877    6552067   83  Linux/dev/sdb5          5+     75      71-    530440+  83  Linux/dev/sdb6         76+    146      71-    530440+  83  Linux/dev/sdb7        147+    148       2-     14941+  83  Linux/dev/sdb8        149+    150       2-     14941+  83  Linux


---------------------------------------------------------------------------------------------

上面2个烧录的脚本:

echo "--------proc u-boot-6q.bin----"sudo dd if=1.txt of=/dev/sdb bs=1k seek=1 syncsyncsudo dd if=2.txt of=/dev/sdb1 syncsyncsudo dd if=3.txt of=/dev/sdb5 syncsyncsudo dd if=4.txt of=/dev/sdb2 syncsync


--------------------------------------------------------

   Device Boot Start   End    MiB    #blocks   Id  System/dev/sdb1         7+    21-    15-     14942   83  Linux/dev/sdb2        21+    36-    15-     14942   83  Linux/dev/sdb3        36+  2042-  2007-   2054525    5  Extended/dev/sdb4      2042+  4049-  2007-   2054525   83  Linux/dev/sdb5        36+   554-   519-    530440+  83  Linux/dev/sdb6       554+  1072-   519-    530440+  83  Linux/dev/sdb7      1072+  1087-    15-     14941+  83  Linux/dev/sdb8      1087+  1101-    15-     14941+  83  LinuxWarning: no primary partition is marked bootable (active)This does not matter for LILO, but the DOS MBR will not boot this disk.Successfully wrote the new partition tableRe-reading the partition table ...BLKRRPART: Device or resource busyThe command to re-read the partition table failed.Run partprobe(8), kpartx(8) or reboot your system now,before using mkfsIf you created or changed a DOS partition, /dev/foo7, say, then use dd(1)to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1(See fdisk(8).)formating android imagesmke2fs 1.42 (29-Nov-2011)Filesystem label=dataOS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks128512 inodes, 513631 blocks25681 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=52848230416 block groups32768 blocks per group, 32768 fragments per group8032 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912Allocating group tables: done                            Writing inode tables: done                            Creating journal (8192 blocks): doneWriting superblocks and filesystem accounting information: done mke2fs 1.42 (29-Nov-2011)Filesystem label=systemOS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks33200 inodes, 132610 blocks6630 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=1384120325 block groups32768 blocks per group, 32768 fragments per group6640 inodes per groupSuperblock backups stored on blocks: 32768, 98304Allocating group tables: done                            Writing inode tables: done                            Creating journal (4096 blocks): doneWriting superblocks and filesystem accounting information: donemke2fs 1.42 (29-Nov-2011)Filesystem label=cacheOS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks33200 inodes, 132610 blocks6630 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=1384120325 block groups32768 blocks per group, 32768 fragments per group6640 inodes per groupSuperblock backups stored on blocks: 32768, 98304Allocating group tables: done                            Writing inode tables: done                            Creating journal (4096 blocks): doneWriting superblocks and filesystem accounting information: donemke2fs 1.42 (29-Nov-2011)Filesystem label=venderOS type: LinuxBlock size=1024 (log=0)Fragment size=1024 (log=0)Stride=0 blocks, Stripe width=0 blocks3744 inodes, 14940 blocks747 blocks (5.00%) reserved for the super userFirst data block=1Maximum filesystem blocks=154664962 block groups8192 blocks per group, 8192 fragments per group1872 inodes per groupSuperblock backups stored on blocks: 8193Allocating group tables: done                            Writing inode tables: done                            Creating journal (1024 blocks): doneWriting superblocks and filesystem accounting information: donehkbdm@ubuntu:~/img_yang/tools$ cd ..



原创粉丝点击