LINUX SAMA5D3启动SD卡制作步骤

SD卡经过读卡器插入虚拟机内执行如下命令检测挂在位置。

mount | grep /media

卸载SD

sudo umount /dev/sdxx

 

用“dd”命令清除MRB和分区信息:

sudo dd if=/dev/zero of=/dev/sdx bs=10M count=1

用“fdisk”命令修改分区表

sudo fdisk /dev/sdx

按“P”键显示当前分区信息:

Command (m for help): p Disk /dev/mmcblk0: 2002 MB, 2002780160 bytes 11 heads, 10 sectors/track, 35560 cylinders Units = cylinders of 110 * 512 = 56320 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 

 

按“n”键增加一个primary分区,并确定分区尺寸

Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-35560, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-35560, default 35560): +64M 

按“t”键,再输入数字 6, 使新分区为FAT16文件系统:

Command (m for help): t Selected partition 1 Hex code (type L to list codes): 6 Changed system type of partition 1 to 6 (FAT16) 

按“n”键创建第二个分区:

Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1194-35560, default 1194): Using default value 1194 Last cylinder, +cylinders or +size{K,M,G} (1194-35560, default 35560): +1500M 

按“P”键显示当前分区信息:

Command (m for help): p Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 1193 65610 6 FAT16 /dev/mmcblk0p2 1194 29121 1536040 83 Linux 

按“W”键写入分区信息。

Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. 

格式化并挂载分区:

sudo mkfs.msdos /dev/mmcblk0p1   # format as FAT32 you need add parameters "-F 32".  if using SD card reader you need change the device name to "/dev/sdx1" 

sudo mkfs.ext2 /dev/mmcblk0p2    # if using SD card reader you need change the device name to "/dev/sdx2"

 

sudo mount -t vfat /dev/sdx1/mnt/fat

sudo mount -t ext2 /dev/sdx2 /mnt/ext

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值