首页 > 编程知识 正文

Linux arm系统支持U盘exfat和ntfs,linux系统支持的文件系统

时间:2023-05-06 09:16:13 阅读:207090 作者:2991

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

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

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

解压缩安装:# tar zxf ntfs-3g_ntfsprogs-2017.3.23.tgz编译和安装ntfs-3g源代码。# cd ntfs-3g_ntfsprogs-2017.3.23# ./configure CC=arm-hisiv100nptl-linux-gcc -host=arm-linux  --prefix=/home/bsjsp/ntfs-3g_ntfsprogs-2017.3.23/usr --exec-prefix=/home/bsjsp/ntfs-3g_ntfsprogs-2017.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      Start         End      Blocks  Id System
/dev/sda1               1       29720    30433216   b Win95 FAT32


版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。