Empeg ext3 filesystem support

This page contains instructions and files for getting the ext3 filesystem 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. Read-write mounts of the drives also happen more quickly. This kernel also has multicast support enabled as of version 440 which I needed for another project. This page is meant to be a writeup of how to do it in case anybody else is interested. First a few warnings though...



1. 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.

2. If something goes wrong this could eat all the files on your empeg

3. I take no responsibility for any bad things that happen because of this, if you don't understand the directions don't try this.

4. Almost all the code for this was written by other people. I wrote the mountHack. I am not a kernel programmer or even a real C programmer. It is only about 15 lines of code, but probably contains at least 20 bugs :-)




Now that I got all the warnings out of the way I have been running some version of ext3 on my empegs (2) since July 2002 with out any major problems or data loss. It is definitely nice not to have to deal with the drive checks or worry too much about losing power to the player while the drives are mounted read/write.



Update! All the ext3 patches have been integrated into hijack so you should just grab that patch instead as it is more up to date. The original patches are available here if you want them for some reason. If you don't want the source than all you need is one of the kernel binaries and e2fsck and tune2fs below.

Important Note: Although this code is now a part of hijack it is not supported by Mark Lord (the official hijack god). If you have any problems with ext3 or questions about this page please do not bug him with them. The best way to receive help with any problems that may arise is to post a message on the empeg BBS or send a private message to mcomb using that BBS.

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


kernel binary This is a kernel built from the hijack v440 source with ext3 support turned on for a mark2. This binary is provided for your convenience, the source can be found at the main hijack site.
kernel binary This is a kernel built from the hijack v324 source with ext3 support turned on for a mark1. I don't have a mark1 so this is untested. This binary is provided for your convenience, the source can be found at the main hijack site. I am no longer bothering to compile kernels for mk1s since nobody is downloading them and the extra memory required to do it probably makes using ext3 on a mk1 a little iffy anyway. Send me a message on the bbs if you want to try it anyhow.
e2fsck binary The vesion of fsck that ships with the empeg doesn't really understand ext3. This is a newer version (from e2fsprogs-1.29) of e2fsck. You need this to run a filesystem check on an ext3 partition. This binary is provided for your convenience, the source can be found as part of the the e2fsprogs package.
tune2fs binary The version of tune2fs that ships with the empeg doesn't really understand ext3. This is a newer version (from e2fsprogs-1.29) of tune2fs. You need this to build the ext3 journal file on your drive. This binary is provided for your convenience, the source can be found as part of the the e2fsprogs package.




Ok, so to get this to work first install the kernel using the empeg_download program or Tony Fabris' logo editor and then follow the steps below. You will need to be running the developer version of the empeg software.



1. Put the new versions of e2fsck and tune2fs on your empeg using ftp, or a terminal program. I put mine in /bin. Don't forget to make them executable. You should also move the old fsck.ext2 out of the way and add a link to the new e2fsck like this...

empeg:/# mv /bin/fsck.ext2 /bin/fsck.ext2.bak
empeg:/# ln -s /bin/e2fsck /bin/fsck.ext2




2. You nead to create a journal file on each target partition. These instructions are for the first drive, if you have a dual drive player do this twice substituting drive1 for drive0 and /dev/hdc4 for /dev/hda4. This will also disable the periodic fscks which aren't really needed. If you don't want to disable them then skip the last line.

empeg:/# umount /drive0
empeg:/# tune2fs -j /dev/hda4                                          
tune2fs 1.29 (24-Sep-2002)                                                      
Creating journal inode: done                                                    
This filesystem will be automatically checked every -1 mounts or                
0 days, whichever comes first.  Use tune2fs -c or -i to override.               
empeg:/# tune2fs -c0 -i0 /dev/hda4
tune2fs 1.29 (24-Sep-2002)                                                      
Setting maximal mount count to -1                                               
Setting interval between check 0 seconds

3. Next mount the drive as ext3

empeg:/# mount /dev/hda4 /drive0                                       
empeg-EXT3: changing mount type for:/dev/hda4                                   
EXT3-fs: mounted filesystem with ordered data mode. 

That is it. You should be all set. Repeat for drive1 if desired.



If you ever want to convert back to ext2 it is a simple process. You need to run a tune2fs command to remove the journal file and should then do a fsck to make sure the volume is in a happy state.

empeg:/# tune2fs -O ^has_journal /dev/hdaX
empeg:/# fsck -f /dev/hdaX