Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Thu Apr 05, 2012 2:35 Post subject: [SOLVED] EXT2 kernel extension: how to obtain?
I am configuring an ASUS WL-520GU with an 8GB flash drive so naturally, I want to use an EXT2 (non journaling) file system so as to avoid unnecessary wear on the NAND flash device and run Optware (OTRW).
That being said, EXT3 is supported with the DD-WRT build prescribed in the WL-520GU wiki. This wiki describes how to insert kernel modules support a file system. I'd like to do this by creating a small EXT3 partion (16 MB) and format the rest of the drive with EXT2. The small partion would hold the kernel modules for EXT2 file system support and the script to insert the EXT2 module.
The wiki has a link to the kernel modules and the files include:
I did not see an ext2.ko file, however, maybe one of the other .ko files provide EXT2. If this is not the case, I would be interested in obatining \ making 'ext2.ko'.
I have an ASUS RT-N16 running Optware: maybe the 'ext2.ko' can be copied (assuming that it this functionality is already built into the kernel)?
I have had success with OTRW using EXT2: I am not sure that FAT would work with OTRW. I hope that someone with more experience will weigh in with a solution to the EXT2 challenge.
Update: not sure if the large EXT2 partition can be mounted, although it is recognized:
ext2.zip
Description:
Module from WRT54GL DD-WRT v24-sp2 (10/10/09) voip (SVN revision 13064)
Need to check if the RT-N16 kernel (DD-WRT v24-sp2 (11/21/10) BIG revision 15778) is similar enough to the target kernel. UPDATE: kernel version is 2.4 and not 2.6. I doubt that the ext2.ko (2.6 Kernel) module will work with a 2.4 kernel.
Use the firmware mod kit. Extract it from a similar firmware with the same kernel as your firmware. _________________ 2 times APU2 Opnsense 21.1 with Sensei
2 times RT-AC56U running DD-WRT 45493 (one as Gateway, the other as AP, both bridged with LAN cable)
3 times Asus RT-N16 shelved
E4200 V1 running freshtomato 2020.8 (bridged with LAN cable)
3 times Linksys WRT610N V2 converted to E3000 and 1 original E3000 running freshtomato 2020.8 (bridged with LAN cable)
Joined: 24 Feb 2009 Posts: 2026 Location: Sol System > Earth > USA > Arkansas
Posted: Tue Apr 17, 2012 0:50 Post subject:
All of the firmwares that support USB also should have the ext2 and ext3 modules. I think those are dependent on one other module ('jbd' I think), but just look in the "/lib/modules/2.4.37/" directory for your required modules.
Edit: One additional item, I do not think all of those modules have or require the ".ko" extension. Try inserting without the extension on it, if that does not work, then try the ".o". _________________ E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]
Try Dropbox for syncing files - get 2.5gb online for free by signing up.
Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Tue Apr 17, 2012 13:10 Post subject:
@crashfly and for future readers, it would seem that kernel 2.6, the modules are of the format ext2.ko, whereas for kernel 2.4 it is of the format ext2.o:
Joined: 24 Feb 2009 Posts: 2026 Location: Sol System > Earth > USA > Arkansas
Posted: Tue Apr 17, 2012 23:37 Post subject:
gatorback wrote:
@crashfly and for future readers, it would seem that kernel 2.6, the modules are of the format ext2.ko, whereas for kernel 2.4 it is of the format ext2.o:
...
All: If this is not correct or incomplete please weigh in.
More to report after trying this.
Not true. I am using the K26 kernel on my E3000. Here is a listing of the file system modules:
Code:
root@xxxxxxxx:/lib/modules/2.6.24.111/kernel/fs# ls -la
drwxr-xr-x 13 root root 133 Mar 19 02:03 .
drwxr-xr-x 5 root root 48 Mar 19 02:03 ..
drwxr-xr-x 2 root root 24 Mar 19 02:03 cifs
drwxr-xr-x 2 root root 24 Mar 19 02:03 ext2
drwxr-xr-x 2 root root 24 Mar 19 02:03 ext3
drwxr-xr-x 2 root root 23 Mar 19 02:03 fat
drwxr-xr-x 2 root root 24 Mar 19 02:03 fuse
drwxr-xr-x 2 root root 23 Mar 19 02:03 jbd
drwxr-xr-x 2 root root 25 Mar 19 02:03 jffs2
-rw-r--r-- 1 root root 8592 Mar 19 02:03 mbcache.ko
drwxr-xr-x 2 root root 25 Mar 19 02:03 msdos
drwxr-xr-x 2 root root 181 Mar 19 02:03 nls
drwxr-xr-x 2 root root 24 Mar 19 02:03 vfat
drwxr-xr-x 2 root root 23 Mar 19 02:03 xfs
root@xxxxxxxx:/lib/modules/2.6.24.111/kernel/fs#
Joined: 24 Feb 2009 Posts: 2026 Location: Sol System > Earth > USA > Arkansas
Posted: Wed Apr 18, 2012 3:27 Post subject:
gatorback wrote:
@crashfly: please run:
Code:
find . | grep ext
and publish the results.
On my router, that gets about 30 pages of files (from root). What exactly are you looking for? FYI, the extension ".ko" is *not* required when inserting modules.
As for your build, you may have a bug as the ext2 module is not included. (You could report it as such on the timeline.) On my router, both the ext2 and ext3 are included. _________________ E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]
Try Dropbox for syncing files - get 2.5gb online for free by signing up.
Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Not true. I am using the K26 kernel on my E3000. Here is a listing of the file system modules:
Code:
root@xxxxxxxx:/lib/modules/2.6.24.111/kernel/fs# ls -la
drwxr-xr-x 13 root root 133 Mar 19 02:03 .
drwxr-xr-x 5 root root 48 Mar 19 02:03 ..
drwxr-xr-x 2 root root 24 Mar 19 02:03 cifs
drwxr-xr-x 2 root root 24 Mar 19 02:03 ext2
drwxr-xr-x 2 root root 24 Mar 19 02:03 ext3
drwxr-xr-x 2 root root 23 Mar 19 02:03 fat
drwxr-xr-x 2 root root 24 Mar 19 02:03 fuse
drwxr-xr-x 2 root root 23 Mar 19 02:03 jbd
drwxr-xr-x 2 root root 25 Mar 19 02:03 jffs2
-rw-r--r-- 1 root root 8592 Mar 19 02:03 mbcache.ko
drwxr-xr-x 2 root root 25 Mar 19 02:03 msdos
drwxr-xr-x 2 root root 181 Mar 19 02:03 nls
drwxr-xr-x 2 root root 24 Mar 19 02:03 vfat
drwxr-xr-x 2 root root 23 Mar 19 02:03 xfs
root@xxxxxxxx:/lib/modules/2.6.24.111/kernel/fs#
I can only see one module there, the others are directories where supposedly the modules reside.
@gatorback
Have you tried to attach an ext2 formatted drive?
ext3 is afaik backwards compatible with ext2 (ext3 minus journalling is ext2) so you shouldn't need the ext2 driver.
I even have some vague remembrance of seeing that mkfs can format ext3 without journal by using a cmd switch to mkfs. _________________ Kernel panic: Aiee, killing interrupt handler!
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Wed Apr 18, 2012 13:21 Post subject:
@lom: Thank you for commenting.
Quote:
I even have some vague remembrance of seeing that mkfs can format ext3 without journal by using a cmd switch to mkfs.
I did a Google search for mkfs, ext3, no journal but was not succesful in finding anything that would format ext3 sans journal: any guidance to a links \ examples?
@lom: Yes, EXT3 is the superset of EXT2 is my understanding as well. I was looking at the results, but wasn't sure because I was not successful in my attempt to mount the device to a directory:
The screenshot says it recognizes the EXT2 partition as partition 2.
Maybe I am not mounting it correctly:
Code:
root@FOXTROT:~# cat /proc/partitions
major minor #blocks name
8 0 7759872 scsi/host0/bus0/target0/lun0/disc
8 1 16033 scsi/host0/bus0/target0/lun0/part1
8 2 7743330 scsi/host0/bus0/target0/lun0/part2
root@FOXTROT:~# ls -l /opt
-rwxrwxrwx 1 1000 1000 423424 Feb 4 2011 fs.gz
drwx------ 2 root root 12288 Mar 31 2012 lost+found
root@FOXTROT:~# mount scsi/host0/bus0/target0/lun0/part2 /mnt
root@FOXTROT:~# touch /mnt/test.txt
root@FOXTROT:~# ls /mnt/
root@FOXTROT:~# touch /opt/optText.txt
root@FOXTROT:~# ls -l /opt
-rwxrwxrwx 1 1000 1000 423424 Feb 4 2011 fs.gz
drwx------ 2 root root 12288 Mar 31 2012 lost+found
-rw-r--r-- 1 root root 0 Jan 3 13:08 optText.txt
root@FOXTROT:~# mount -o noatime mount scsi/host0/bus0/target0/lun0/part2 /mnt
root@FOXTROT:~# touch /mnt/test.txt
root@FOXTROT:~# ls /mnt/
root@FOXTROT:~#
root@FOXTROT:/# ls /mmc
root@FOXTROT:/# mount -o noatime mount scsi/host0/bus0/target0/lun0/part2 /mmc
root@FOXTROT:/# ls /mmc
root@FOXTROT:/# touch /mmc/test.txt
root@FOXTROT:/# ls /mmc
root@FOXTROT:/#
root@FOXTROT:/# mkdir /mnt/test
root@FOXTROT:/# mount -o noatime mount scsi/host0/bus0/target0/lun0/part2 /mnt/t
est
root@FOXTROT:/# touch /mnt/test/text.txt
root@FOXTROT:/# ls /mnt/test/
root@FOXTROT:/# ls /mnt
root@FOXTROT:/#
I'm wondering ifcopying the two ext2 files from the WRT54GL to the ASUS target.
I'm hoping that LOM's comment that the EXT2 is unnecessary is correct and that someone will point out a way to mount the EXT2 partition: simple is better.
1. There are plenty or recent/recommended firmwares which can be downloaded from dd-wrt.com.
2. My two cents: the kernel module will work if compiled for a similar processor. So, if your ASUS processor is backwards compatible with the processor of the WRT router, then you could use it. Otherwise simply rip the module from a big/mega firmware for similar ASUS routers.
I have installed the firmware mod kit with svn on Ubuntu Oneiric x64. _________________ 2 times APU2 Opnsense 21.1 with Sensei
2 times RT-AC56U running DD-WRT 45493 (one as Gateway, the other as AP, both bridged with LAN cable)
3 times Asus RT-N16 shelved
E4200 V1 running freshtomato 2020.8 (bridged with LAN cable)
3 times Linksys WRT610N V2 converted to E3000 and 1 original E3000 running freshtomato 2020.8 (bridged with LAN cable)
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Sat Jul 14, 2012 17:11 Post subject: Which issue(s) need to be addressed? How?
I had shelve this project beause of family, but now that it is buttoned up (Rest in Peace dad), it is time to press forward. Several issues come up:
Issue 1: Suitability of ext2.o
=========================
I'm speculating that the ext2.0 from a BCM5352 chipset will work with a BCM5354 WL520GU shipset. Any discussion is appreciated.
Somehow the jbd file is used by ext3. Should ext2 somehow be included? If yes then how? Maybe it should return something like this?
jbd 58280 1 [ext3 ext2]
Issue 3: Mounting the ext2 partition
===========================
USB Flashdrive Ext3 partition was remapped from /opt to /jffs. Attempt to mount ext2 partition to /opt:
Code:
root@host:/jffs# mount scsi/host0/bus0/target0/lun0/part2 /opt
root@host:/jffs# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
devpts on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part1 on /jffs type ext3 (rw)
Would have liked to see:
/dev/discs/disc0/part2 on /opt type ext2 (rw)
Actionable guidance is appreciated. CLI commands are better. Thank you.