xref: /aosp_15_r20/external/e2fsprogs/ext2ed/README (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Workerext2ed - The extended-2 filesystem editor, version e2fsprogs
2*6a54128fSAndroid Build Coastguard Worker
3*6a54128fSAndroid Build Coastguard Worker
4*6a54128fSAndroid Build Coastguard WorkerThis version of ext2ed has been modified and updated by Theodore Ts'o
5*6a54128fSAndroid Build Coastguard Workerfor inclusion with the e2fsprogs package.  It now builds with modern
6*6a54128fSAndroid Build Coastguard Workerncurses and I've fixed various small bugs, particular in the redrawing
7*6a54128fSAndroid Build Coastguard Workerand resizing functions.
8*6a54128fSAndroid Build Coastguard Worker
9*6a54128fSAndroid Build Coastguard WorkerIt is currently not built by default -- the top-level e2fsprogs
10*6a54128fSAndroid Build Coastguard WorkerMakefile doesn't recurse into this directory.  This is because ext2ed
11*6a54128fSAndroid Build Coastguard Workerhas a number of VERY SERIOUS shortcomings:
12*6a54128fSAndroid Build Coastguard Worker
13*6a54128fSAndroid Build Coastguard Worker1)  It doesn't work on filesystems bigger than 2GB
14*6a54128fSAndroid Build Coastguard Worker
15*6a54128fSAndroid Build Coastguard Worker2)  It assumes that all's the world an Intel, and assumes that
16*6a54128fSAndroid Build Coastguard Worker	everything is in Intel (little-endian) byte order.
17*6a54128fSAndroid Build Coastguard Worker
18*6a54128fSAndroid Build Coastguard WorkerFixing either of these problems would be non-trivial, and so I at this
19*6a54128fSAndroid Build Coastguard Workerpoint DO NOT RECOMMEND that distributions try to include this program,
20*6a54128fSAndroid Build Coastguard Workereven as modified and updated in e2fsprogs.  This especially goes for
21*6a54128fSAndroid Build Coastguard WorkerDebian, where the Debian maintainer for e2fsprogs has a history of
22*6a54128fSAndroid Build Coastguard Workermaking authorized changes to e2fsprogs to include programs that aren't
23*6a54128fSAndroid Build Coastguard Workersupported, and then starts bugging me with bug reports.  YES I KNOW.
24*6a54128fSAndroid Build Coastguard WorkerTHIS PROGRAM HAS HORRIBLE SHORTCOMINGS.  IT IS INCLUDED HERE ONLY
25*6a54128fSAndroid Build Coastguard WorkerBECAUSE IT'S A CONVENIENT WAY FOR (FOR E2FSPROGS DEVELOPERS ON INTEL
26*6a54128fSAndroid Build Coastguard WorkerMACHINES) TO GENERATE TEST CASES BY SELECTIVELY CORRUPTING
27*6a54128fSAndroid Build Coastguard WorkerFILESYSTEMS.  I WILL NOT SUPPORT THIS PROGRAM FOR USE BY GENERAL USERS
28*6a54128fSAndroid Build Coastguard WorkerSO PLEASE DO NOT INCLUDE IT IN A DISTRIBUTION.
29*6a54128fSAndroid Build Coastguard Worker
30*6a54128fSAndroid Build Coastguard WorkerI have currently disabled the use of GNU Readline in this program,
31*6a54128fSAndroid Build Coastguard Workerbecause readline and ncurses really don't play well together at all.
32*6a54128fSAndroid Build Coastguard WorkerReadline assumes that it can write arbitrary text to the screen
33*6a54128fSAndroid Build Coastguard Worker(especially when it tries to print out a completion list), which just
34*6a54128fSAndroid Build Coastguard Workerdoesn't work with ncurses.  Fixing this so they would work together
35*6a54128fSAndroid Build Coastguard Workerwould require wholesale changes to readline.
36*6a54128fSAndroid Build Coastguard Worker
37*6a54128fSAndroid Build Coastguard Worker				Theodore Ts'o
38*6a54128fSAndroid Build Coastguard Worker				[email protected]
39*6a54128fSAndroid Build Coastguard Worker				May 12, 2001
40*6a54128fSAndroid Build Coastguard Worker
41*6a54128fSAndroid Build Coastguard Worker----------------------------------------------------------------------------
42*6a54128fSAndroid Build Coastguard Worker
43*6a54128fSAndroid Build Coastguard Workerext2ed - The extended-2 filesystem editor, version 0.2
44*6a54128fSAndroid Build Coastguard Worker------------------------------------------------------
45*6a54128fSAndroid Build Coastguard Worker
46*6a54128fSAndroid Build Coastguard WorkerThis is version 0.2 of ext2ed - The extended-2 filesystem editor.
47*6a54128fSAndroid Build Coastguard Worker
48*6a54128fSAndroid Build Coastguard WorkerModifications on Apr 5 2001
49*6a54128fSAndroid Build Coastguard WorkerThis is minor bug fixes to ext2ed, as of April 2001.
50*6a54128fSAndroid Build Coastguard WorkerIt supports modern ext2 version that has file type in directory structure
51*6a54128fSAndroid Build Coastguard Workerand fixes the misunderstanding between ncurses and
52*6a54128fSAndroid Build Coastguard Workerreadline.
53*6a54128fSAndroid Build Coastguard Worker
54*6a54128fSAndroid Build Coastguard WorkerI first applied patches from Red Hat except the one for readline that
55*6a54128fSAndroid Build Coastguard Workerrewrote a readline behavior.
56*6a54128fSAndroid Build Coastguard Worker
57*6a54128fSAndroid Build Coastguard WorkerGlobals diffs between version 0.1 and 0.2 is stored in file :
58*6a54128fSAndroid Build Coastguard Worker	diff-ext2ed.1.2
59*6a54128fSAndroid Build Coastguard Worker
60*6a54128fSAndroid Build Coastguard WorkerChristian Bac <[email protected]>
61*6a54128fSAndroid Build Coastguard Worker
62*6a54128fSAndroid Build Coastguard Worker----------------------------------------------------------------------------
63*6a54128fSAndroid Build Coastguard Worker
64*6a54128fSAndroid Build Coastguard WorkerDocumentation
65*6a54128fSAndroid Build Coastguard Worker-------------
66*6a54128fSAndroid Build Coastguard Worker
67*6a54128fSAndroid Build Coastguard Workerext2ed's documentation consists of three documents:
68*6a54128fSAndroid Build Coastguard Worker
69*6a54128fSAndroid Build Coastguard Worker1.	The user's guide.
70*6a54128fSAndroid Build Coastguard Worker2.	Technical overview of the ext2 filesystem.
71*6a54128fSAndroid Build Coastguard Worker3.	The EXT2ED design and implementation document.
72*6a54128fSAndroid Build Coastguard Worker
73*6a54128fSAndroid Build Coastguard WorkerThose documents are available in the doc directory, in linuxdoc-sgml and
74*6a54128fSAndroid Build Coastguard Workerpostscript formats.
75*6a54128fSAndroid Build Coastguard Worker
76*6a54128fSAndroid Build Coastguard WorkerThe documentation is also available online at:
77*6a54128fSAndroid Build Coastguard Worker
78*6a54128fSAndroid Build Coastguard Workerhttp://tochnapc2.technion.ac.il
79*6a54128fSAndroid Build Coastguard Worker
80*6a54128fSAndroid Build Coastguard Workerunder the ext2ed section.
81*6a54128fSAndroid Build Coastguard Worker
82*6a54128fSAndroid Build Coastguard WorkerInstallation
83*6a54128fSAndroid Build Coastguard Worker------------
84*6a54128fSAndroid Build Coastguard Worker
85*6a54128fSAndroid Build Coastguard Workerext2ed requires the kernel sources and the readline and ncurses packages.
86*6a54128fSAndroid Build Coastguard WorkerPlease edit the makefile if you are using an "old" version of ncurses (See the
87*6a54128fSAndroid Build Coastguard Workerdetails below) or if gcc can't find the various header files and libraries.
88*6a54128fSAndroid Build Coastguard Worker
89*6a54128fSAndroid Build Coastguard WorkerTo install, simply issue a 'make' command to compile and a 'make install'
90*6a54128fSAndroid Build Coastguard Workercommand to install. I have also included an already compiled linux a.out
91*6a54128fSAndroid Build Coastguard Workerbinary.
92*6a54128fSAndroid Build Coastguard Worker
93*6a54128fSAndroid Build Coastguard Workerext2ed and ncurses
94*6a54128fSAndroid Build Coastguard Worker------------------
95*6a54128fSAndroid Build Coastguard Worker
96*6a54128fSAndroid Build Coastguard Workerext2ed uses the ncurses library for terminal output. It is very important
97*6a54128fSAndroid Build Coastguard Workerthat ncurses will be properly installed on your system:
98*6a54128fSAndroid Build Coastguard Worker
99*6a54128fSAndroid Build Coastguard Worker1.	Old versions of ncurses (around 1.8.5) need the OLD_NCURSES compile
100*6a54128fSAndroid Build Coastguard Worker	time option in EXT2ED.
101*6a54128fSAndroid Build Coastguard Worker
102*6a54128fSAndroid Build Coastguard Worker	At least from 1.9.2c, this flag should not be used. I would recommend
103*6a54128fSAndroid Build Coastguard Worker	upgrading the ncurses library to the newer versions.
104*6a54128fSAndroid Build Coastguard Worker
105*6a54128fSAndroid Build Coastguard Worker2.	ncurses uses its own terminfo database rather then the termcap file.
106*6a54128fSAndroid Build Coastguard Worker	It is important that the terminfo database will be found by ncurses.
107*6a54128fSAndroid Build Coastguard Worker	If this is not the case, you will see on startup some lines which
108*6a54128fSAndroid Build Coastguard Worker	refer to /etc/termcap. This will mean that there is a problem with
109*6a54128fSAndroid Build Coastguard Worker	the terminfo database.
110*6a54128fSAndroid Build Coastguard Worker
111*6a54128fSAndroid Build Coastguard Worker3.	Newer versions of ncurses (and the 1.3 series of the kernel) describe
112*6a54128fSAndroid Build Coastguard Worker	the linux console in the entry 'linux' and not 'console', as it was
113*6a54128fSAndroid Build Coastguard Worker	before. If you run ext2ed in the linux console, you should either
114*6a54128fSAndroid Build Coastguard Worker	set your TERM environment variable to 'linux' or link
115*6a54128fSAndroid Build Coastguard Worker	l/linux to c/console in the terminfo database.
116*6a54128fSAndroid Build Coastguard Worker
117*6a54128fSAndroid Build Coastguard Worker4.	The precompiled binary was linked with ncurses 1.9.4 and will search
118*6a54128fSAndroid Build Coastguard Worker	for the terminfo database on /usr/local/lib/terminfo. If you are
119*6a54128fSAndroid Build Coastguard Worker	using it, and your 1.9.4 compatible terminfo database is not on the
120*6a54128fSAndroid Build Coastguard Worker	directory above, use the TERMINFO environment variable to specify
121*6a54128fSAndroid Build Coastguard Worker	an alternate location.
122*6a54128fSAndroid Build Coastguard Worker
123*6a54128fSAndroid Build Coastguard WorkerRunning ext2ed
124*6a54128fSAndroid Build Coastguard Worker--------------
125*6a54128fSAndroid Build Coastguard Worker
126*6a54128fSAndroid Build Coastguard WorkerFor those of you who don't like reading lengthy articles, here are a few
127*6a54128fSAndroid Build Coastguard Workerbasic guidelines:
128*6a54128fSAndroid Build Coastguard Worker
129*6a54128fSAndroid Build Coastguard Worker1.	Don't use ext2ed to change a mounted filesystem !
130*6a54128fSAndroid Build Coastguard Worker
131*6a54128fSAndroid Build Coastguard Worker	Using ext2ed in read-only mode on a mounted filesystem can be allowed
132*6a54128fSAndroid Build Coastguard Worker	by using the configuration file option 'AllowMountedRead on'. However,
133*6a54128fSAndroid Build Coastguard Worker	note that the displayed data will be unreliable.
134*6a54128fSAndroid Build Coastguard Worker
135*6a54128fSAndroid Build Coastguard Worker2.	ext2ed currently can't handle filesystems bigger than 2 GB. I am
136*6a54128fSAndroid Build Coastguard Worker	sorry for the inconvenience. This will hopefully be fixed in future
137*6a54128fSAndroid Build Coastguard Worker	releases.
138*6a54128fSAndroid Build Coastguard Worker
139*6a54128fSAndroid Build Coastguard Worker3. 	Before running ext2ed, edit the configuration file
140*6a54128fSAndroid Build Coastguard Worker	/var/lib/ext2ed/ext2ed.conf to suit your needs. The various
141*6a54128fSAndroid Build Coastguard Worker	configuration options are documented there.
142*6a54128fSAndroid Build Coastguard Worker
143*6a54128fSAndroid Build Coastguard Worker4.	Use the 'setdevice' command to open an ext2 filesystem.
144*6a54128fSAndroid Build Coastguard Worker	e.g. 'setdevice /dev/hda1'.
145*6a54128fSAndroid Build Coastguard Worker
146*6a54128fSAndroid Build Coastguard Worker5.	If the filesystem is an ext2 filesystem and ext2ed fails to
147*6a54128fSAndroid Build Coastguard Worker	autodetect this, use the 'ForceExt2 on' configuration file option.
148*6a54128fSAndroid Build Coastguard Worker
149*6a54128fSAndroid Build Coastguard Worker6.	The filesystem will always be opened in read-only mode. Feel free to
150*6a54128fSAndroid Build Coastguard Worker	experiment, but take care with the 'enablewrite' command.
151*6a54128fSAndroid Build Coastguard Worker
152*6a54128fSAndroid Build Coastguard Worker-----------------------------------------------------------------------------
153*6a54128fSAndroid Build Coastguard Worker
154*6a54128fSAndroid Build Coastguard WorkerFeel free to send me feedback with anything regarding to ext2ed.
155*6a54128fSAndroid Build Coastguard Worker
156*6a54128fSAndroid Build Coastguard WorkerEnjoy,
157*6a54128fSAndroid Build Coastguard Worker
158*6a54128fSAndroid Build Coastguard WorkerGadi Oxman <[email protected]>
159*6a54128fSAndroid Build Coastguard WorkerHaifa, August 23 1995
160*6a54128fSAndroid Build Coastguard Worker
161