Linux 下將sd格式化成ext2格式並掛載__Linux

來源:互聯網
上載者:User

sd卡在windows下格式化,只能格式化為FAT檔案系統格式的,但是FAT檔案系統在linux下不支援軟連結。所以又必要將其格式化成linux下的檔案系統格式,例如EXT2。

使用嵌入式linux中內建的工具命令mkfs.ext2。

root@target:~# mkfs.ext2 /dev/mmcblk0 
mke2fs 1.41.5 (23-Apr-2009)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
31360 inodes, 125440 blocks
6272 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
16 block groups
8192 blocks per group, 8192 fragments per group
1960 inodes per group
Superblock backups stored on blocks: 
8193, 24577, 40961, 57345, 73729


Writing inode tables:  0/16 1/16 2/16 3/16 4/16 5/16 6/16 7/16 8/16 9/1610/1611/1612/1613/1614/1615/16done                            
Writing superblocks and filesystem accounting information: done


This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@target:~# 

掛載sd卡

root@target:~# mount -t ext2 /dev/mmcblk0 /media/mmc1/

進入sd卡,出現“lost+found”表示已經掛載成功

root@target:~# cd /media/mmc1/
root@target:/media/mmc1# ls
lost+found

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.