linux SD 读写问题
来源:互联网 发布:raphaelmin.js 编辑:程序博客网 时间:2024/05/07 11:07
- 请教一下大家 为什么 执行完 write2sd的下载脚本 linux 立刻不再识别sd卡
- (df已经看不到设备了)
- 之后发现在dev目录下依旧有sdbx 还可以执行烧写脚本(不过烧完uoot只显示了OK。。。)
- 在win7下依旧能识别 而只要随便添加个文件 再插回linux就又可以识别了
- 求原因
- 主要是可以弹出 不知道直接拔SD对其是否有很大影响
- 还请不惜赐教 非常感谢 orz
- write2sd内容如下:
- #!/bin/sh
- sudo dd iflag=dsync oflag=dsync if=./BL1/BL1.bin of=/dev/sdb1 seek=1
- sudo dd iflag=dsync oflag=dsync if=./BL2/lcd.bin of=/dev/sdb1 seek=49
。。。
。。。
后来发现 输出文件就应该是/dev/sdb 虽然df出来的sdb1
但在插入sd后/dev目录下会多出sdb和sdb1
执行sudo fdisk sdb 输入密码后 输入 p
(tip:p print the partition table
q quit without saving changes)
显示如下
Disk sdb: 4076 MB, 4076863488 bytes
255 heads, 63 sectors/track, 495 cylinders, total 7962624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
sdb1 128 7962623 3981248 b W95 FAT32
255 heads, 63 sectors/track, 495 cylinders, total 7962624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
sdb1 128 7962623 3981248 b W95 FAT32
输入q 退出后
执行sudo fdisk sdb1 输入密码后 输入 p
显示如下
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xfa884e87.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Building a new DOS disklabel with disk identifier 0xfa884e87.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
所以输出设备对应的文件应该是/dev/sdb
换上新的SD卡 发现不会再无法识别 估计是卡的原因
虽然旧卡不显示 但不影响烧写 (成功烧写uboot)
0 0
- linux SD 读写问题
- SD卡读写问题
- 解决SD卡不能读写的问题
- 转贴 解决sd卡的读写问题
- 解决SD卡不能读写的问题
- stm32读写SD卡的问题
- 安卓6.0读写sd卡问题
- SD读写
- Android中对sd卡的读写权限问题
- Android中对sd卡的读写权限问题
- Android中对sd卡的读写权限问题
- 解决android6.0系统无法读写SD的问题
- Android6.0 在外置SD卡 读写问题.....
- 关于Android5.0SD卡读写的问题
- 【转载】Linux下用dd命令扇区读写SD卡
- 嵌入式Linux磁盘(硬盘、SD卡)读写性能测试
- linux下SD卡mount的问题
- 关于SD卡启动linux的问题
- 中国maven资源仓库设置
- ubuntu svn命令行下使用
- 走出误区之ListView
- 存储过程
- 在视图上创建ListCtrl的做法
- linux SD 读写问题
- [LeetCode] Longest Valid Parentheses
- Linux内核源码特殊用法
- Tomcat启动超时
- BZOJ[Noi2010]能量采集
- C语言的文件操作
- UNION的使用
- simhash算法
- 《互联网架构的设计哲学》