• Stars
    star
    888
  • Rank 51,399 (Top 2 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 14 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EXT4 implementation for FUSE

ext4fuse

This is a read-only implementation of ext4 for FUSE. The main reason this exists is to be able to read linux partitions from OSX. However, it should work on top of any FUSE implementation. Linux and FreeBSD have been tested to some point and I've heard that OpenSolaris should also work.

Write support will only come if I get the time, knowledge, patience and nerve to support it. Most of them I lack, so it's a long shot. However, the fact that ext4fuse is read-only also means that it's completely safe to use.

Installation

OS X

If you use OS X I suggest you rely on the homebrew project.

Once you have homebrew installed, simply type the following two commands:

$ brew cask install osxfuse

$ brew install ext4fuse

At least on Leopard, you need to add your user to the operator group so you can have readonly permissions to the disks. Use this:

$ sudo dscl . append /Groups/operator GroupMembership <your-user>

Also, you will need to know the name of your ext4 partition. Take a look at the Mac Disk Utility. It should be something like /dev/disk0s5.

FreeBSD

Simply install it through the ports tree:

$ cd /usr/ports/sysutils/fusefs-ext4fuse && make install clean

Remember that you need the fuse module loaded. In my experience it doesn't load automatically, but then again, I have nearly zero experience with FreeBSD.

Compiling from source

If you prefer bleeding edge, get the source, untar it and compile using:

$ make

or in case you are on FreeBSD:

$ gmake

You need to have pkg-config for the compilation to work as well as the FUSE kernel module. For OSX you should use fuse4x (notice that fuse4x is also available via brew install).

Mounting

You can mount a filesystem like this:

$ ext4fuse <device> <mountpoint>

If you compiled from source, and you haven't manually installed ext4fuse in your $PATH, go to the directory where you did the compilation and run this

$ ./ext4fuse <device> <mountpoint>

The should be the partition device and the is the directory where you want to mount your partition.

On macOS Sierra (10.12) or later, when mounting a filesystem with sudo, you need to add the option -o allow_other to allow non-root accounts access to the mount. See this issue for details.

Reporting bugs

If you notice a problem, please file a bug report.

If you have a reproducible problem the easiest for debugging is to share the filesystem. First of all, umount the partition, then you can create a backup like this:

$ dd if=<device> bs=64K | gzip -c > filesystem.backup.gz

Then, just upload the .gz file somewhere.

However, I understand that you generally do not want to do that. In that case you can also generate a log file. Notice that the log file still contains the directory listings.

To get a logfile, you can run ext4fuse like this:

$ ext4fuse <device> <mountpoint> -o logfile=/dev/stdout

If you do not want to share the logfile, another option is to provide a backtrace with gdb or a coredump (a coredump might contain file data).

Finally, you can always drop a mail:

Limitations

  • All code is religiously Little Endian only. If you don't know what this means, you are probably OK (ie, you are using an intel or amd cpu). The code should be better tested on x86-64, you should not be using anything else on modern hardware anyway.
  • Block numbers over 32 bits aren't supported. You hit those when you reach around the terabyte, and I don't have any way to test that. It should be quite easy to fix, but I don't feel like spending time on something that neither has a use for me or can be proved to be correct. I don't have such big disks :P.

More Repositories

1

uforth

A Forth interpreter in ARM assembly
Assembly
13
star
2

arm-malloc

Simple malloc implementation in ARM assembly
8
star
3

mortal-coil

Solves the mortal coil game (check http://hacker.org/coil/)
C
7
star
4

wincron

Cron for Windows
C
5
star
5

mandelbrot

Trivial mandelbrot in C
C
5
star
6

gerard.github.com

github homepage
4
star
7

mines

An ncurses minesweeper
C
3
star
8

gh-builder

Android apps continuous integration system
Python
2
star
9

TwoDeeWars

A 2D space shooter
Python
2
star
10

dotfiles

My dotfiles
Vim Script
2
star
11

bugnes

Emulator framework
C
2
star
12

bless

A curses widget library for python
Python
1
star
13

brtrees

Algoritmos y Estructuras de Datos sobre Árboles
1
star
14

wavgen

Simple WAV file generator
Python
1
star
15

adequatehexagon

OpenGL 2D experiment
C
1
star
16

mkrecords

Mario Kart Wii Records!
1
star
17

rtp-ticket-server

Real Time Programming Project: A ticket server
C
1
star
18

hrai2

How Rich Am I??
Python
1
star
19

nanoscm

Very basic LISP expression parser
C
1
star
20

sdl-toys

C
1
star
21

dice

Old experiment in OpenGL
C
1
star
22

rwhs-exercises

Exercises from the book: Real World Haskell
Haskell
1
star
23

osmio

My own unix clone (one of these days...)
C
1
star
24

portrayer

A lightweight profiler
C
1
star
25

rtp-labs

Real Time Programming Laboratories
C
1
star
26

hrai

Dead: check hrai2 instead
C
1
star
27

tvplay

Simple shell script to launch media from console
Shell
1
star
28

algos

Simple by-the-book algorithms
C
1
star
29

ushell

Small unusable shell
C
1
star
30

disconnected-mst

Calculate the minumum spanning tree out of a disconnected graph (uses Kruskal algorithm)
C++
1
star
31

hdldump

Shell wrapper to run hdldump
Shell
1
star