LINUX SAMA5D3啟動SD卡製作步驟

來源:互聯網
上載者:User

標籤:

將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

 

LINUX SAMA5D3啟動SD卡製作步驟

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.