DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-04-11 03:11:46

oceand
New member
Registered: 2007-04-23
Posts: 3

Mounting an ISO image

A friend and I were talking today and thought it would be very useful to be able to mount iso images directly on the DNS.

Using the command :

mount -o loop -t iso9660 file.iso /mnt/HD_a2/SomeRandomDirectory

causes this error :

mount: mounting /dev/loop1 on /mnt/HD_a2/SomeRandomDirectory/ failed: No such device

Any ideas?

Offline

 

#2 2008-04-12 04:18:30

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

Setting up the loop device works fine (you can test by using losetup independently); the mount from ffp (/ffp/bin/mount) is busybox and not as informative as built-in mount (/bin/mount); if you use the built-in mount you'll get the following instead of "No such device"

Code:

mount: unknown filesystem type 'iso9660'

Looks like that kernel doesn't have iso9660 support compiled in; /proc/filesystems confirms:

Code:

cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   futexfs
nodev   tmpfs
nodev   eventpollfs
nodev   devpts
        ext3
        ext2
        cramfs
nodev   ramfs
        minix
        msdos
        vfat
nodev   nfs
nodev   autofs
nodev   rpc_pipefs

now to go find (or compile) that as a module...

-Jeff

Offline

 

#3 2008-04-12 04:31:58

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

Excellent; the isofs and udf modules from here http://dev.skcserver.de/dns323/modules_v1.03/kernel/fs/ will add iso9660 and udf filesystem support (should be fine for 1.03 and 1.04 firmware; I'm testing on 1.04).

Just download them and then use the following:

Code:

insmod isofs.ko

Recheck /proc/filesystems and you'll see the missing filesystem supported; then your mount command will succeed.

-Jeff

Offline

 

#4 2008-04-12 06:37:33

oceand
New member
Registered: 2007-04-23
Posts: 3

Re: Mounting an ISO image

Thank you very much that is exactly what I needed.

Offline

 

#5 2008-04-12 08:20:46

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

BTW I'm experimenting with this a bit; if you want to handle DVDs with a bridged udf/iso9660 filesystem as udf then the order of loading of modules matters because mount will use the order in /proc/filesystems to determine the order for detecting auto (this seems easier than bothering with setting up an ordered /etc/filesystems file instead)...

So:

     insmod udf.ko
     insmod isofs.ko
     mount -o loop dvd.iso /mnt/dvd

Specifically don't use the -t option; so auto detect takes place (udf preferred first followed by iso9660).

You can also increase the number of loop devices from 6 to 8 with (beyond 8 didn't work; since loop isn't loaded as a separate module I don't know if there's any way on this device to reconfigure without a custom firmware):

     for NUM in $(seq 6 7); do mknod /dev/loop$NUM b 7 $NUM; done

-Jeff

Offline

 

#6 2009-02-28 23:05:36

SweMart
Member
From: Stockholm, Sweden
Registered: 2008-03-18
Posts: 14

Re: Mounting an ISO image

Has anyone got kernel modules for 1.05 or 1.06(i.e. udf.ko and isofs.ko)?

Offline

 

#7 2009-03-02 12:33:43

redstorm
New member
Registered: 2009-03-01
Posts: 2

Re: Mounting an ISO image

Hi,

I've successfully build udf.ko and isofs.ko from linux 2.6.12.6 using the wiki cross-compile how-to, but the result is not what I expected..

I'm able to mount a simple ISO like trinux-iso distrib (small 19MB iso), but behaviour is erratic.. :

Code:

/mnt/HD_a2 # mount -o loop trinux-0.890.iso iso 
/mnt/HD_a2 # cd iso/
/mnt/HD_a2/iso # ls
isolinux  trinux
/mnt/HD_a2/iso # cd trinux/
/mnt/HD_a2/iso/trinux # ls
README   bootpkg  kpkg     modules  pkg      tux
/mnt/HD_a2/iso/trinux # cp README ../../tmp/

/mnt/HD_a2 # mount          
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
proc on /proc type proc (rw,nodiratime)
/dev/loop0 on /sys/crfs type squashfs (ro)
/dev/sda2 on /mnt/HD_a2 type ext2 (rw)
/dev/sdb3 on /mnt/HD_b3 type ext3 (rw)
/dev/sda4 on /mnt/HD_a4 type ext2 (rw)
none on /proc/bus/usb type usbfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/sda2 on /opt type ext2 (rw)
/dev/loop1 on /mnt/HD_a2/iso type iso9660 (ro)
/mnt/HD_a2 # umount /dev/loop1 
Segmentation fault

From there, a new telnet session will hang and wont let me prompt in,  I cannot even cleanly reboot my DNS323 : reboot hang also..

Has anyone compiled the kernel modules isofs and udf versions 2.6.12.6 and have more success than I do ?
Anyone is having more success with mounting ISOs with a 1.05 fw DNS323 ?

Offline

 

#8 2009-03-02 12:43:14

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

Are you sure you need to compile a new one? I haven't tried it since 1.04; but the wiki lists the kernel for 1.03 -> 1.06 as the same (2.6.12.6). For usb-storage I know the 1.03 based kernel module still works fine under 1.06.

I suspect the same files I tested and posted about above will still work fine on 1.06: http://dev.skcserver.de/dns323/modules_v1.03/kernel/fs/

-Jeff

Offline

 

#9 2009-03-02 13:50:26

redstorm
New member
Registered: 2009-03-01
Posts: 2

Re: Mounting an ISO image

Hi Jeff,

Thanks for helping.
I've tried replacing my own compiled module with the ones from your link, but it results in a Segmentation Fault on the first mount :

Code:

/mnt/HD_a2/bin # insmod udf.ko
/mnt/HD_a2/bin # insmod isofs.ko
/mnt/HD_a2/bin # cd ..
/mnt/HD_a2 # mount -o loop trinux-0.890.iso iso/
Segmentation fault

Here is my dmesg output, it seems a request for a '1064' byte buffer is causing the error as it's not a multiple of 512.. ?!

Code:

getblk(): invalid block size 1064 requested
hardsect size: 512
Unable to handle kernel NULL pointer dereference at virtual address 00000000
../.. Stack Dump follows

btw, i just realized my DNS323 runs the 1.06 fw not the 1.05, if it matters..

I'll try to fetch the latest versions I can found for theese fs and try another compile..
Any other idea ?


-Alex

Offline

 

#10 2009-03-02 16:53:24

SweMart
Member
From: Stockholm, Sweden
Registered: 2008-03-18
Posts: 14

Re: Mounting an ISO image

redstorm wrote:

Code:

/mnt/HD_a2 # umount /dev/loop1 
Segmentation fault

From there, a new telnet session will hang and wont let me prompt in,  I cannot even cleanly reboot my DNS323 : reboot hang also..

I'm seeing something similar, when I execute the mount command it just hangs. It's impossible to kill the process or to shutdown the DNS cleanly.

Am I using the wrong mount binary?

Edit: Tried using /bin/mount and it produced the same error, i.e:

Code:

getblk(): invalid block size 1064 requested
hardsect size: 512
Unable to handle kernel NULL pointer dereference at virtual address 00000000

Last edited by SweMart (2009-03-02 19:42:25)

Offline

 

#11 2009-03-03 09:42:20

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

Well; I'm using 1.06 now and can reproduce the failures you guys are reporting. Interesting apparently those modules aren't working with kernel now even though it is listed as the same version (and the usb-storage module still works fine).

-Jeff

Offline

 

#12 2009-03-19 07:58:09

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

With the 1.06 sources now released by D-Link; I rebuilt the kernel modules.

I successfully mounted both UDF and ISO9660 filesystems using isofs.ko and udf.ko respectively (see the earlier posts about loading them in the right order to handle bridged DVD filesystems, etc.

I've done minimal testing so far; but everything went smoothly (no errors, hangs, etc, connects available) and I confirmed that my DNS-323 still reboots cleanly. Use at your own risk; but the results match my much earlier testing under 1.04 reported at the beginning of this thread.

-Jeff


Attachments:
Attachment Icon iso-udf.1.06.tgz, Size: 65,010 bytes, Downloads: 570

Offline

 

#13 2009-03-30 19:40:33

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: Mounting an ISO image

Thanks jdoering.
These new modules also work with the CH3SNAS v1.05. Finally I can mount UDF ISOs!

Offline

 

#14 2009-06-04 16:08:48

fullcity
Member
Registered: 2007-09-19
Posts: 9

Re: Mounting an ISO image

Any chance the same can be done for the ntfs.ko? It also will not work with newer kernel. I am getting repeatable segmentation errors.

Thanks!
Adam

Offline

 

#15 2009-06-06 10:15:09

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Mounting an ISO image

Be forwarned about testing, at your own risk, etc... I've posted a copy in the original thread on the topic: http://dns323.kood.org/forum/viewtopic. … 039#p30039 (somehow I thought I'd already uploaded one back then but I didn't find it searching; maybe I never got around to it because I hadn't finished testing and got sidetracked with other DNS-323 stuff like ALSA).

-Jeff

Offline

 

#16 2009-09-29 19:53:15

imdos
New member
Registered: 2009-09-29
Posts: 1

Re: Mounting an ISO image

jdoering wrote:

With the 1.06 sources now released by D-Link; I rebuilt the kernel modules.

I successfully mounted both UDF and ISO9660 filesystems using isofs.ko and udf.ko respectively (see the earlier posts about loading them in the right order to handle bridged DVD filesystems, etc.

I've done minimal testing so far; but everything went smoothly (no errors, hangs, etc, connects available) and I confirmed that my DNS-323 still reboots cleanly. Use at your own risk; but the results match my much earlier testing under 1.04 reported at the beginning of this thread.

-Jeff

Is there any chance anybody could rebuilt the udf module with support for udf v250 and above? I am unable to mount some udf iso files and receive the following error message

Code:

UDF-fs: minUDFReadRev=250 (max is 201)

Offline

 

#17 2010-10-02 04:08:03

jmac880n
New member
Registered: 2010-10-02
Posts: 1

Re: Mounting an ISO image

Is anybody interested in isofs.ko and udf.ko modules for the DNS-321 release 1.03?

I noticed that the modules are available for various DNS-323 versions, but the lowly '321 seems to have been ignored.

Version 1.03 is the latest software release for the '321 and runs a 2.6.22.18 kernel. These modules work for me, but I have no convenient and stable web site to share them.

I downloaded the source and gen'ed up my own modules. If others are interested, I can give a step-by-step process to make your own if you have several gig of free space on a recent x86 Linux system.  I used an Ubuntu 10.4 laptop that I had already configured for development.  There might be programs required to build that I happened to have installed, so don't try it unless you are at least somewhat familiar with finding and installing programs for your flavor of Linux.

As an added bonus, the download includes a ready-to-go cross compiler chain running on Linux, so you can work on porting your favorite apps that you feel are missing.

Offline

 

#18 2010-10-15 19:45:04

futbol4me
Member
Registered: 2010-09-18
Posts: 11

Re: Mounting an ISO image

Yes, I am interested in the isofs.ko and udf.ko for the DNS-321.  Could you share?

Offline

 

#19 2010-10-15 23:53:54

rac8006
Member
Registered: 2010-10-15
Posts: 13

Re: Mounting an ISO image

I'd like to know how to recompile the usb source.  I down loaded the GPL and did
a build.  It built the kernel but does not build any of the drivers.  I tried to do a
source drivers/usb/Kconfig.  It failed.  Any help would be appreciated.

RAC

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB