U盘linux ext怎么查看,Linux加载Ext2/Ext3文件系统作的U盘

关于ext2/ext3:

一. 准备

e2fsprogs-1.39.tar.gz

在内核内需要将ext2/ext3编译进内核(系统启动后使用cat /proc/filesystem察看一下)

二. 编译e2fsprogs

tar xzvf e2fsprogs-1.39.tar.gz

mkdir e2fsprogs

cd e2fsprogs-1.39

./configure \

--prefix=/opt/project/uto/busybox/ntfs/e2fsprogs \

--bindir=/opt/project/uto/busybox/ntfs/e2fsprogs/bin \

--exec-prefix=/opt/project/uto/busybox/ntfs/e2fsprogs \

--sbindir=/opt/project/uto/busybox/ntfs/e2fsprogs/sbin \

--libdir=/opt/project/uto/busybox/ntfs/e2fsprogs/lib \

--disable-ldconfig \

--with-linker=mipsel-linux-ld \

--with-cc=mipsel-linux-gcc \

--enable-elf-shlibs \

--disable-bsd-shlibs \

--build=i386-linux \

--host=mipsel-linux

make

make install

在make install时,会有errors

......

mkdir /opt/project/uto/busybox/ntfs/e2fsprogs/info

INSTALL_DATA /opt/project/uto/busybox/ntfs/e2fsprogs/info/libext2fs.info*

/usr/bin/install: cannot stat `libext2fs.info*': No such file or directory

make[1]: *** [install-doc-libs] Error 1

make[1]: Leaving directory `/opt/project/uto/busybox/ntfs/e2fsprogs-1.39/doc'

make: [install-doc-libs] Error 2 (ignored)

不过这对于使用e2fsprogs应该是没有影响的,到e2fsprogs/sbin目录下,里面的一些工具对使用ext2/ext3比较有用,如:mkfs.ext2 etc.

cp /e2fsprogs/sbin/* 目标板根目录/usr/sbin

(mipsel-linux-readelf -d mkfs.ext2 察看需要哪些动态库;mipsel-linux-strip /e2fsprogs/lib/*去掉调试信息)

cp /e2fsprogs/lib/* 目标板根目录/usr/lib

三. 使用

mkfs.ext2 /dev/mtdblock3(mke2fs /dev/mtdblock3)

/*

# mke2fs /dev/mtdblock3

mke2fs 1.39 (29-May-2006)

ext2fs_check_if_mount: No such file or directory while determining whether /dev/

mtdblock3 is mounted.

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

49152 inodes, 390656 blocks

19532 blocks (5.00%) reserved for the super user

First data block=1

48 block groups

8192 blocks per group, 8192 fragments per group

1024 inodes per group

Superblock backups stored on blocks:

8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

*/

mount -t ext2 /dev/mtdblock3 /mnt

四. Windows下访问U盘

需要安装工具,如Ext2IFS_1_11a.exe等

1. use EXT2 IFS (EXT2 Installable File System For Windows).

1.1 download the software from the below link.

1.2 install it, and select which disk num you want. and also you can set it to read-only access or read-write access.

for example, in my PC, there is C disk, and D disk in Windows XP.

and there is two EXT3 disk in Linux.

so, I can allocate E disk and F disk for these two EXT3 disk. and in Windows explore, there show four disks.

2. use explore2fs.

it is read-only access, but it can not be shown in Windows explore with the uniform interface such as NTFS file system.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ext2/3,扩展文件系统,常用于Linux系统。是很多Linux发行版的默认文件系统Linux ext2/ext3文件系统使用索引节点来记录文件信息,用像windows的文件分配表。 索引节点(inode)是一个结构,它包含了一个文件的长度、创建及修改时间、权限、所属关系、磁盘中的位置等信息。 一个文件系统维护了一个索引节点的数组(GroupDesc),每个文件或目录都与索引节点数组中的唯一一个元素对应。 系统给每个索引节点分配了一个号码,也就是该节点在数组中的索引号,称为索引节点号。 linux文件系统将文件索引节点号和文件名同时保存在目录中。所以,目录只是将文件的名称和 它的索引节点号结合在一起的一张表,目录中每一对文件名称和索引节点号称为一个连接。 对于一个文件 来说有唯一的索引节点号与之对应,对于一个索引节点号,却可以有多个文件名与之对应。因此,在磁盘 上的同一个文件可以通过不同的路径去访问它。 本程序是一个ext2/ext3文件系统查看器(ext4暂不支持).可以打开镜像文件及硬盘设备文件查看具体的 文件系统结构信息,如超级块,块组信息,文件inode,目录信息,文件信息,提取文件内容等。本人写这个程序就是 为了学习一下ext2/3,也希望通过本程序能让读者了解ext2/3文件系统结构. 具体使用方法请看readme
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值