Chinaunix首页 | 论坛 | 博客
  • 博客访问: 717084
  • 博文数量: 182
  • 博客积分: 2088
  • 博客等级: 大尉
  • 技术积分: 1698
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-16 15:09
个人简介

.

文章分类

全部博文(182)

文章存档

2016年(1)

2015年(18)

2014年(14)

2013年(20)

2012年(129)

分类: 嵌入式

2012-06-15 21:59:30

关于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.
阅读(2171) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

Amazing172012-12-08 00:27:13

博主博客里面好多好东西
有点相见恨晚的感觉
以后常来