700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Linux arm系统支持U盘exfat和ntfs

Linux arm系统支持U盘exfat和ntfs

时间:2021-02-14 09:33:53

相关推荐

Linux arm系统支持U盘exfat和ntfs

fat32在linux上已经支持得很好了,此处就不再详述。

exfat的支持可以下载 /hechaoyuyu/exfat 里面的源码,这部分源码可以嵌入到内核中,具体参考里面的README。

ntfs在linux内核选项打开后,可以挂载mount -t ntfs /dev/sda1 /mnt/usb,但是是只读的(linux系统认为对ntfs类型系统写入是不安全的)。如果需要支持读写,需要在网上找ntfs-3g相关的开源代码/blfs/view/svn/postlfs/ntfs-3g.html,编译出ntfs-3g工具和库文件libntfs.so文件,strip之后的大小在400K左右。

解压缩安装:# tar zxf ntfs-3g_ntfsprogs-.3.23.tgz编译和安装ntfs-3g源代码。# cd ntfs-3g_ntfsprogs-.3.23# ./configure CC=arm-hisiv100nptl-linux-gcc -host=arm-linux --prefix=/home/bsjsp/ntfs-3g_ntfsprogs-.3.23/usr --exec-prefix=/home/bsjsp/ntfs-3g_ntfsprogs-.3.23/usr# make# make install

copy到arm系统上,进行挂载:

# mkdir /mnt/ntfs#./ntfs-3g /dev/sda1 /mnt/ntfs/

此时挂载上的ntfs就是读写的了

文件系统常用shell命令:

查询当前支持的filesystem:cat /proc/filesystems

查询当前设备是什么类型文件系统:fdisk -l

# fdisk -l

Disk /dev/sda: 31.1 GB, 31163678720 bytes

64 heads, 32 sectors/track, 29720 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot StartEnd Blocks Id System

/dev/sda1 1 29720 30433216 b Win95 FAT32

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。