当前位置:操作系统 > DOS/Win9x >>

如何在windows9x下访问linux分区

    1. 简 介

   Linux 内 核 支 持 众 多 的 文 件 系 统 类 型, 目 前 它 可 以 读 写( 至 少 是 读) 大 部 分 的 文 件 系 统.Linux 经 常 与Microsoft Windows 共 存 于 一 个 系 统 或 者 硬 盘 中.Linux 对windows9x/NT 的 文 件 系 统 支 持 的 很 好, 反 之 你 想 在windows 下 用Visual C++ 编 程 的 同 时 能 看 一 看Linux 的GCC-HOWTO 则 必 须 得 费 点 劲. 本 文 试 图 给 你 一 个 简 单 的 帮 助.

   这 份 HOWTO 是 免 费 文 件(free documentation); 你 可 以 在FSF 出 版 的 GNU GPL 之 规 定 下 重 新 散 播 及/ 或 修 改 它; 您 可 以 自 由 决 定 适 用 GPL 2.0 或 之 後 的 任 何 版 本.

   希 望 这 份 文 件 的 发 布 能 对 您 有 帮 助, 但 我 们 不 提 供 任 何 保 证, 即 使 是 商 业 上 或 某 特 殊 用 途 的 隐 含 保 证 亦 然. 详 情 请 参 见 GNU 一 般 公 开 授 权 书.

   本 文 在 不 影 响 理 解 的 前 提 下, 不 区 分 文 件 系 统 和 分 区 的 概 念.

   1. Linux 存 取 FAT/FAT32/NTFS 分 区.

   Linux 内 核 应 至 少 支 持 fat/msdos 文 件 系 统( 安 装 后). vfat 文 件 系 统 一 般 编 译 为 Module , 可 以 用 modprobe vfat 装 入. ntfs 在 版 本 较 高 的 内 核 里 可 以 支 持. 如 果 你 用 的 是2.0.3?, 就 需 要 下 载 一 份 回 来, 然 后 patch 到 内 核 中 再 编 译.

   fat/vfat 分 区 可 以 mount 成 可 读 写 的 文 件 系 统(rw). ntfs 分 区 目 前 只 能mount 成 只 读(ro) 的 文 件 系 统.

   2. Microsoft 存 取 ext2 分 区.

   2.1. EXT2 TOOLS v1.1

   EXT2 TOOLS 是 一 组 在 DOS 下 可 以 让 你 读 LINUX EXT2 文 件 系 统 的 工 具 包. 它 由 以 下 程 序 组 成:

E2CAT 类似于 Linux的 cat命令
E2CD 类似于 Linux的 cd 命令
E2CP 类似于 Linux的 cp命令
E2LS 类似于 Linux的 ls命令
E2PART 列出硬盘的分区信息
E2PWD 类似于 Linux的 pwd命令
EXT2 TO   是 GNU General Public License软件

   现 在 所 有 的 程 序 已 在 GCC 下 编 译, (DOS 下) 运 行 时 需 要 GO32 DOS 扩 展 程 序GO32.EXE. GO32.EXE 包 含 在 EXT2TOOLS 的 发 布 中,做 为DJGPP 的 一 部 分

 2.1.1. 安装 EXT2 TOOLS
 [MSDOS]
 >mkdir c:\ext2l
 >pkunzip -d ext2tool_1_1.zip
 >dir

2.1.2. 运行 EXT2 TOOLS
 在运行前设置环境变量:

 > SET E2CWD=129:5
 或
 > SET E2CWD=129:5:234
 | | | |__目录的i节点号,缺省为根i节点号2.
 | | |_____ EXT2文件系统的LINUX分区.
 | |________物理硬盘的代号:
 | 0: A软驱
 | 1: B软驱
 | 128:第一块硬盘
 | 129:第二块硬盘
 |_____________环境变量

   保 证 GO32.EXE 在 系 统 PATH 中.

   运 行 e2ls 命 令 就 能 列 出 第 二 块 硬 盘 的 第 五 分 区 的 文 件 系 统.

   运 行 e2part 129 命 令 能 列 出 第 二 块 硬 盘 的 分 区 情 况.

   2.1.3. EXT2 TOOLS 可 以 在 Microsoft Windows3x/9x 下 运 行,

 Peeter Joot  把 EXT2 TOOLS移植到 NT上. EXT2 TOOLS之 NT版
 ext2nt-1.06.tar.gz可以从

   2.1.4 存 在 的 问 题

   第 三 块 硬 盘 (IDE) 和 SCSI 硬 盘 支 持 否 因 机 器 而 异. 可 用 与 否 取 决 于 系 统 是 否 依 赖 中 断13 访 问 硬 盘.

   2.1.5 命 令 用 法 # Will translate into chinese soon.

 # Sorry for my laziness.
E2CAT
  -

SYNOPSIS
 E2CAT [-bt] pathname

DESCTIPTION
 The E2CAT program will copy the contents of the file
 identified by ext2 pathname to the standard output.

 The following options are available:

 -b Binary mode. No translation performed.
 
 -t Text mode (default). LF translated to CR/LF.

E2CD
  

SYNOPSIS
 E2CD pathname

 DESCRIPTION
 The pathname must identify an ext2 directory. That
 directory is made the current working directory.

 NOTE
 E2CD is a .BAT file that creates another .BAT file
 (called ___E2CD.BAT) that modifies the E2CWD envir-
 onment variable. It then executes ___E2CD.BAT and
 deletes it. (So beware if you already have a file
 called ___E2CD.BAT.)

 For use with 4DOS, an E2CD.BTM file is also included.
 4DOS will use that instead of E2CD.BAT.


 E2CP
   

 SYNOPSIS
 E2CP [-bt] file1 file2

 DESCTIPTION
 The E2CP program will copy the contents of the file
 identified by ext2 pathname file1 to the MSDOS file
 file2.

 The following options are available:

 -b Binary mode (default). No translation performed.

 
 -t Text mode. LF translated to CR/LF.

 

 E2LS
   

 SYNOPSIS
 E2LS [-adiltr] pathname ...

 DESCRIPTION
 The pathnames may identify ext2 directories or files.
 Wildcard characters (*, [], ?, etc.) may be used in a
 manner similar to what the Linux shell allows.

 The E2LS program provides a directory listing of the
 specified pathnames in a manner similar to the Linux
 ls program.

 The following options are supported:

 -a Include file names starting with . in listing.
 -d List only pathname, even if it is a directory.
 -i Include inode number in listing.
 -l Produce a long listing.
 -t Sort by modification time.
 -r Reverse the sort order.


 E2PART
   --

 SYNOPSIS
 E2PART diskno

 DESCRIPTION
 The E2PART program lists the partitions that are
 available on a particular physical disk. This program
 does not use the E2CWD environment variable, instead
 the disk number is given as an argument to the E2PART
 program.

 BUGS
 The program is not very good at identifying MSDOS file
 systems.

 E2PWD
   -

 SYNOPSIS
 E2PWD

 DESCRIPTION
The E2PWD program prints the current directory.

   2.2. LREAD 2.3

   另 一 个 DOS 下 读 LINUX EXT2 文 件 系 统 的 软 件. LREAD 是 GPL 自 由 软 件. v1.0 由 Jason Hunter and David Lutz 开 发. V2.X 由 Werner Zimmermann

   2.2.1. 安 装 LREAD

   十 分 简 单, 只 要 在 DOS 下 把 LREAD-2.3.zip 解 开 到 相 应 目 录, 就 会 发 现 原 码 和 二 进 制 程 序 ldir 和 lread, 一 般 无 须 编 译 和 配 置 就 能 运 行.

   LREAD 在windows 3x/9x 能 运 行.

   2.2.3. 命 令 用 法

 命令 ldir [-h | -v] [-s/dev/hd..] [Linux_Directory]
 列出 ext2 (文件系统)目录

   选 项:

   -h 帮 助 信 息

   -v 版 本 信 息

   -s 指 定 目 录 所 在 的 硬 盘 分 区, 例 如/dev/hda5. 缺 省 值 在 ldir.h 中 指 定. 支 持 软 驱:/dev/fd?. 如 果 仅 指 定/dev/hda 或 /dev/hdb, 不 给 出 路 经,ldir 将 要 搜 索 此 驱 动 器 上 的 第 一 个LINUX 分 区. 须 指 出, 若 省 缺 选 项 -s/dev/...,ldir 会 用 它 在 编 译 时 预 先 指 定 的 硬 盘( 通 常 为/dev/hda).ldir 支 持SCSI 硬 盘 分 区. 相 应 上 述 选 项 可 用/dev/sda 和/dev/sda3.Linux_Directory 要 列 出 的 目 录 名. 省 略 的 话, 则 用/. 全LINUX 路 经 名 定 界 符 用/( NOT \), 支 持 匹 配 符, 大 小 写 敏 感.

命令 lread [-h | v] [-s/dev/hd..] Linux_File [DOS_File]

列出Linux文件或复制到DOS中.
选项
 -h帮助信息
 -v版本信息
 -s参见ldir
 Linux_File 合法的 UNIX源文件名.
 DOS_File 合法的 DOS目的文件名.省略的话,输出到
 标准输出(STDOUT)上.

   2.3 目 前 最 实 用 的 GPL 软 件 是 FSDEXT2

 Copyright (C) 1997 by Peter van Sebille.

   此 软 件 只 能 在 win32 下 运 行, 可 以 把 相 应 的 linux ext2 分 区 mount 成 在windows 下 只 读 的 盘, 使 用 极 为 方 便.

   2.3.1 安 装 FSDEXT2

   展 开 95ext2fs.zip 到 一 个 目 录 比 如 c:\fsdext, 运 行

   install.bat 或 直 接 拷 贝 相 关 驱 动 程 序 到 相 应 目 录:

 vext2d.vxd - > c:\windows\system
 tsdext2.vxd - >

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,