jonh@cs.dartmouth.edu copied in this note from Paul Mackerras. It's
timely, and of course it'll become dated as the bugs get fixed.
Date: Mon, 10 Feb 1997 11:47:14 +1000
From: Paul Mackerras <paulus@cs.anu.edu.au>
To: Multiple recipients of list <linux-pmac@arvidsjaur.anu.edu.au>
Subject: converting big endian to little endian ext2 filesystems
First: to clear up some misunderstandings about the little endian ext2
filesystem:
* You *don't* have to change your ext2 filesystems to little endian to
run the 2.1 kernel (not yet anyway). Although little-endian is the
native ext2 format for 2.1, I included a big-endian ext2 filesystem as
well for backwards compatibility (and got chided by Linus Torvalds for
doing so :-).
* The 2.0 kernel *only* supports the big-endian ext2 filesystem.
Don't install the e2fsprogs-1.06 package until you've upgraded to the
2.1 kernel and are satisfied that you won't need to revert to the 2.0
kernel.
* The overhead of the byte-swapping involved in accessing a little-
endian ext2 filesystem is negligible. (I can't imagine a performance-
head like David Miller supporting the change if it had any significant
performance impact. :-)
I tried converting my root filesystem over to little-endian recently.
The result was a disaster. After byte-swapping the filesystem, e2fsck
reported masses of errors, and byte-swapping it back didn't help. So
I made a new little-endian filesystem with mke2fs and restored the
root filesystem from a backup, then ran milo and tried to reboot off
it. It didn't work, of course - milo doesn't yet support
little-endian filesystems. So I ended up using mkfs.bext2 (a copy of
my old mke2fs from the e2fsprogs-1.04 package) to remake the root
filesystem big-endian, and restoring from backup again.
Running e2fsck -s caused massive problems on two of my filesystems,
which were the two that I had originally made with the DR1 installer.
Filesystems that I had made with mke2fs converted just fine.
So, for now, what I would recommend for people running the 2.1 kernel
is to do this:
1. Copy /sbin/mke2fs and /sbin/e2fsck to /sbin/mkfs.bext2 and
/sbin/fsck.bext2.
2. Install the e2fsprogs-1.06 package (and the shared library
packages).
3. *Don't* convert your root filesystem to little-endian. Instead,
change "ext2" to "bext2" on the line for your root filesystem in
/etc/fstab. Fsck will then use fsck.bext2 to check it.
4. Convert other filesystems, if you wish, but make sure you have a
backup. If you choose not to convert a filesystem yet, and it's
listed in /etc/fstab, change its type listed there from ext2 to bext2.
Paul.
jonh@cs.dartmouth.edu, paulus@cs.anu.edu.au, linux-pmac@arvidsjaur.anu.edu.au |