• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

fuse-ext2/H09-May-2019-4,6183,295

tools/H09-May-2019-5,0354,703

.gitignoreH A D09-May-2019883 5247

AUTHORSH A D09-May-2019263 117

COPYINGH A D09-May-201917.7 KiB340281

ChangeLogH A D09-May-20192.8 KiB9977

Makefile.amH A D09-May-2019477 2417

README.mdH A D09-May-20195.5 KiB249184

autogen.shH A D09-May-2019899 2720

configure.acH A D09-May-20194.3 KiB195178

fuse-ext2.1H A D09-May-20192.8 KiB132130

fuse-ext2.pc.inH A D09-May-2019175 97

README.md

1# Fuse Ext2
2
3**Fuse-ext2** is an EXT2/EXT3/EXT4 filesystem for  [**FUSE**](https://github.com/osxfuse/fuse), and is built to work with [**osxfuse**](https://github.com/osxfuse/osxfuse).
4
5## Dependencies
6
7**Fuse-ext2** requires at least Fuse version 2.6.0 for Linux.
8**Fuse-ext2** requires at least **Fuse for macOS** version 2.7.5 or greater.
9
10- Linux: [Fuse](http://fuse.sourceforge.net/)
11- macOS: [Fuse for macOS](https://osxfuse.github.io)
12
13### Alternate Install method of _Fuse for macOS_
14
15**Fuse for macOS** can be installed via [homebrew](http://brew.sh) if [Homebrew-Cask](https://caskroom.github.io/) has been tapped.
16
17To tap **Homebrew-Cask**:
18
19```bash
20brew tap homebrew/cask
21```
22
23To verify that the the above tap is a part of `brew`:
24
25```bash
26brew tap
27```
28
29Look for **`homebrew/cask`** in the output.
30
31To install **Fuse for macOS** using brew:
32
33```bash
34brew cask install osxfuse
35```
36
37## Building
38
39### Debian/Ubuntu:
40
41Building from source depends on the following:
42
43* m4
44* autoconf
45* automake
46* libtool
47* libfuse-dev
48* e2fsprogs
49* comerr-dev
50* e2fslibs-dev
51
52```shell
53$ sudo apt-get install m4 autoconf automake libtool
54$ sudo apt-get install libfuse-dev e2fsprogs comerr-dev e2fslibs-dev
55
56$ ./autogen.sh
57$ ./configure
58$ make
59$ sudo make install
60```
61
62### Fedora
63```bash
64$ sudo dnf install @development-tools m4 autoconf automake libtool e2fsprogs libcom_err-devel fuse-libs e2fsprogs-devel
65# build part
66$ ./autogen.sh
67$ ./configure
68$ make
69$ sudo make install
70```
71
72You can use `checkinstall` or some other equivalent tool to generate an install
73package for your distribution.
74
75### FreeBSD:
76
77Install via pkg:
78
79```shell
80$ pkg install sysutils/fusefs-ext2
81```
82
83Building via ports:
84
85```shell
86$ cd /usr/ports/sysutils/fusefs-ext2
87$ make install clean
88```
89
90### macOS:
91
92Dependencies:
93
94[OSXfuse](https://osxfuse.github.io)
95
96Building **from source** depends on the following:
97
98* m4
99* autoconf
100* automake
101* libtool
102* e2fsprogs
103* xcode-select
104
105Copy and paste this into a file such as `/tmp/ext4/script.sh`.  Remember to `chmod +x script.sh`.  Run it
106from that directory - `./script.sh`
107
108```shell
109#!/bin/sh
110export PATH=/opt/gnu/bin:$PATH
111export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
112
113mkdir fuse-ext2.build
114cd fuse-ext2.build
115
116if [ ! -d fuse-ext2 ]; then
117    git clone https://github.com/alperakcan/fuse-ext2.git
118fi
119
120# m4
121if [ ! -f m4-1.4.17.tar.gz ]; then
122    curl -O -L http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
123fi
124tar -zxvf m4-1.4.17.tar.gz
125cd m4-1.4.17
126./configure --prefix=/opt/gnu
127make -j 16
128sudo make install
129cd ../
130
131# autoconf
132if [ ! -f autoconf-2.69.tar.gz ]; then
133    curl -O -L http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
134fi
135tar -zxvf autoconf-2.69.tar.gz
136cd autoconf-2.69
137./configure --prefix=/opt/gnu
138make
139sudo make install
140cd ../
141
142# automake
143if [ ! -f automake-1.15.tar.gz ]; then
144    curl -O -L http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
145fi
146tar -zxvf automake-1.15.tar.gz
147cd automake-1.15
148./configure --prefix=/opt/gnu
149make
150sudo make install
151cd ../
152
153# libtool
154if [ ! -f libtool-2.4.6.tar.gz ]; then
155    curl -O -L http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
156fi
157tar -zxvf libtool-2.4.6.tar.gz
158cd libtool-2.4.6
159./configure --prefix=/opt/gnu
160make
161sudo make install
162cd ../
163
164# e2fsprogs
165if [ ! -f e2fsprogs-1.43.4.tar.gz ]; then
166    curl -O -L https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.43.4/e2fsprogs-1.43.4.tar.gz
167fi
168tar -zxvf e2fsprogs-1.43.4.tar.gz
169cd e2fsprogs-1.43.4
170./configure --prefix=/opt/gnu --disable-nls
171make
172sudo make install
173sudo make install-libs
174sudo cp /opt/gnu/lib/pkgconfig/* /usr/local/lib/pkgconfig
175cd ../
176
177# fuse-ext2
178export PATH=/opt/gnu/bin:$PATH
179export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
180
181cd fuse-ext2
182./autogen.sh
183CFLAGS="-idirafter/opt/gnu/include -idirafter/usr/local/include/osxfuse/" LDFLAGS="-L/opt/gnu/lib -L/usr/local/lib" ./configure
184make
185sudo make install
186```
187
188# Test
189
190The e2fsprogs live in /opt/gnu/bin and /opt/gnu/sbin. fuse-ext2 is in /usr/local/bin.
191
192```shell
193cd
194dd if=/dev/zero of=/tmp/test-fs.ext4 bs=1024 count=102400
195/opt/gnu/sbin/mkfs.ext4 /tmp/test-fs.ext4
196mkdir -p ~/mnt/fuse-ext2.test-fs.ext4
197fuse-ext2  /tmp/fuse-ext2.test-fs.ext4 -o rw+,allow_other,uid=501,gid=20
198```
199
200To verify the **UID** and **GID** of the user mounting the file system:
201
202```shell
203id
204```
205
206To verify the file system has mounted properly:
207
208```shell
209mount
210```
211
212# Usage
213
214See the [Man page](http://man.cx/fuseext2(1)) for options.
215
216```
217Usage:    fuse-ext2 <device|image_file> <mount_point> [-o option[,...]]
218
219Options:  ro, rw+, force, allow_other
220          Please see details in the manual.
221
222Example:  fuse-ext2 /dev/sda1 /mnt/sda1
223```
224
225# Bugs
226
227* Multithread support is broken for now, so fuse operates in a single thread.
228* There are no known bugs for read-only mode, read only mode should be ok for everyone.
229* Even though write support is available, _please do not mount your filesystems with write support unless you have nothing to lose._
230
231Please send the output of the command below when reporting bugs as a [GitHub Issue](https://github.com/alperakcan/fuse-ext2/issues/new).
232Before submitting a bug report, please look at the [existing issues](https://github.com/alperakcan/fuse-ext2/issues?utf8=%E2%9C%93&q=is%3Aissue) first.
233
234```shell
235$ /usr/local/bin/fuse-ext2 -v /dev/path /mnt/point -o debug
236```
237
238# Important: Partition Labels
239
240Please **do not** use commas `,` in partition labels.
241
242**Wrong:** `e2label /dev/disk0s3 "linux,ext3"`
243
244**Correct:** `e2label /dev/disk0s3 "linux-ext3"`
245
246# Contact
247
248Alper Akcan <alper.akcan@gmail.com>
249