Hey, I thought I would start a new thread for this since the other one I had going didn't have a very helpful title. For those that missed it I managed to get ext3 working on the empeg. Ext3 is a journaling filesystem which has the advantage of not needing to do a long annoying file system check if the empeg crashes during a sync or you forget to mount the drives read only after modifying something. This thread is meant to be a writeup of how to do it in case anybody else is interested. First a few warnings though...

1. This is a very old version of ext3 and there are bugs in it
2. I had to upgrade the empeg kernel to get this to work. Many of the patches did not apply cleanly so I had to hack in any code that didn't get patched by hand. It is possible I made mistakes.
3. I don't know if this version of the linux kernel will cause stability or other problems with the empeg hardware.
4. If something goes wrong this could eat all the files on your empeg
5. This will break IR support (I am hoping somebody here will figure out why)
6. I take no responsibility for any bad things that happen because of this, if you don't understand the directions don't try this.

First of all the bits and pieces. All these files are gzipped so you will need to uncompress them before using them...

1. I had to upgrade the linux kernel from version 2.2.14 to version 2.2.17. A patch to upgrade the empeg kernel tree to that version is at http://macgeek.dyndns.org/empeg/ext3/empeg_v211-linux-2.2.17.patch.gz
2. Next patch is for ext3 support, a patch for that is at http://macgeek.dyndns.org/empeg/ext3/ext3-0.0.3b.patch.gz
3. I also tweaked hijack a little bit to patch on top of the above. A patch for that is at http://macgeek.dyndns.org/empeg/ext3/hijack281+voladj+rds.patch.gz This is optional.
4. A kernel built with all of the above for a mark2 is at http://macgeek.dyndns.org/empeg/ext3/zImage-2.2.17-empeg-ext3-hijack.gz
5. I don't know if the version of fsck that ships with the empeg will be happy with ext3. A newer version of e2fsck that understands ext3 is at http://macgeek.dyndns.org/empeg/ext3/e2fsck.gz You may not actually need this, but it can't hurt.

Ok, so to get this to work first install the kernel and then follow the steps below.

1. Put the new version of fsck on your empeg. I put mine in /bin. Don't forget to make it executable. You should also make the other fsck files links to this to make sure the right ones get called like this...
empeg:/# mv /bin/fsck /bin/fsck.bak
empeg:/# mv /bin/fsck.ext2 /bin/fsck.ext2.bak
empeg:/# ln -s /bin/e2fsck /bin/fsck
empeg:/# ln -s /bin/e2fsck /bin/fsck.ext2

2. You nead to create a journal file on the target drive. There is a utility called tunefs that is supposed to do this, but of course it did not work for me. Here is the hard way to do it...

# First turn on swap, I got a panic using dd without it
empeg:/# swapon /swapfile
Adding Swap: 16596k swap-space (priority -1)

# Make the drive read-write
empeg:/# rwm

# Use dd to make a file for the journal, this creates a 10meg journal file.
# There may a more optimum size
empeg:/# dd if=/dev/zero of=/drive0/.journal bs=1k count=10000
10000+0 records in
10000+0 records out

# Figure out the inode number of the new file. It is that first number.
empeg:/# ls -i /drive0/.journal
12 /drive0/.journal

# Unmount the drive
empeg:/# umount /drive0

# Remount the drive as ext3. The first time you mount the drive
# you need to specify the inode number from above with the journal
# option.
empeg:/# mount -t ext3 /dev/hda4 /drive0 -o journal=12
EXT3-fs: recovery complete.

3. You probably are going to want to update your /etc/fstab file to mount the drives as ext3 instead of ext2.

4. This is the tricky part, we need a way to get the player to use ext3 instead of ext2 when it remounts the drives during a sync.

The first way to do that is to edit the player executable and change the string that says ext2 to ext3. For me this causes a stack trace when the player remounts the drive. It sounds like a good idea, but doesn't work at least for me.

The second way would be to write a kernel patch to intercept the mount call from the player and fix it to do what we want. I am hoping Mark Lord can help out here since he was talking about how to do this in another thread. Mark, you around these days?

The third way would be for the empeg guys to help us out and make the player a little smarter about how it mounts the drives.

5. You may need to replace the empegs init with a script that mounts the drives as ext3 instead of ext2. I already was using a custom script so I didn't worry about this.

Let me know if you have questions or suggestions on the IR driver problem. Those files are only on a DSL line so downloads will be kind of slow.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration