General NAS-Central Forums

Welcome to the NAS community
It is currently Tue Oct 17, 2017 11:23 am

All times are UTC




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Fri Apr 13, 2012 12:06 pm 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
Hi to all,
I also have a Belkin Home Base.
I have a question for the experts: is there a way to permanently enable ext3 support to access disks in NAS mode, without chrooting the full Debian?
The built-in support provided by Belkin is about FAT16, FAT32 and NTFS file systems... I'm quite surprised by the fact they left the most obvious choice for Linux systems.

I'm really missing the possibility to access a ext3 devices in NAS mode :-(

Thanks in advance,
Mauro.


Top
 Profile  
 
PostPosted: Fri Apr 13, 2012 2:17 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
Actually there is no way to permanently do anything, without changing the firmware. The Debian chroot has to be started manually after each boot.

But you can strip the modules from fatpart-homebase.tar.gz, an load them manually after each boot. The box will support ext3, however, I don't know if ext3 disks will be automounted.


Top
 Profile  
 
PostPosted: Fri Apr 13, 2012 3:00 pm 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
Thank you. that's interesting actually. I might connect a disk with a FAT partition, with the ext3 modules and a script that loads them on it, then start that script after each boot.

If it only were a way to automatically start the script after the partition it's in is mounted (something like the Windows autostart/autoplay feature), I would have completely solved my problem...

Mauro.


Top
 Profile  
 
PostPosted: Tue May 08, 2012 7:17 pm 
Offline

Joined: Tue May 08, 2012 7:10 pm
Posts: 2
Hello,

this is my first post in this forum :D

Thanks a lot to the developer who brought debian to this little white box!!! :ugeek:
This brings the Home Base to a whole new level and fixed problems for me i had with the standart os!

Just a little question:
Would there be a version with the new debian 6.0 "Squeeze"?

Thanks a lot!

best regards, redoo


Top
 Profile  
 
PostPosted: Wed May 09, 2012 7:28 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
redoo wrote:
Just a little question:
Would there be a version with the new debian 6.0 "Squeeze"?
I don't think so. Sueeze needs at least 2.6.27, and this box runs 2.6.25. At least udev won't work on this kernel.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 9:21 pm 
Offline

Joined: Tue May 08, 2012 7:10 pm
Posts: 2
Mijzelf wrote:
redoo wrote:
Just a little question:
Would there be a version with the new debian 6.0 "Squeeze"?
I don't think so. Sueeze needs at least 2.6.27, and this box runs 2.6.25. At least udev won't work on this kernel.

Is there no possibility to upgrade to 2.6.27 or higher?
Would be great because "Lenny" will not be updated anymore...


Top
 Profile  
 
PostPosted: Mon May 14, 2012 12:26 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
redoo wrote:
Is there no possibility to upgrade to 2.6.27 or higher?
Possibly. OpenWRT seems to support this SoC, so I guess it shouldn't be too hard to get a recent kernel on this box. But that's out of scope of the 'easy Debian stick', as it involves flashing a custom firmware.

BTW, you *could* try a 'apt-get dist-upgrade', to get Squeeze. udev won't work any longer, but maybe you don't care. AFAIK most packages wil just work.


Top
 Profile  
 
PostPosted: Tue May 22, 2012 7:21 am 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
Hi Mijzelf,
using your fatpart.homebase.tar.gz I was able to add ext3 support to my homebase. I also prepared a simple script that can mount the disk in /mnt/ext3 after I reattach it or I switch on the homebase. Here is the script:

Code:
#!/bin/sh
# Modules for ext3:
BASEDIR=/mnt/shared/Drive\(C0\)/homebase-tools
CMDOP=$(lsmod | grep jbd)
if [ -z "$CMDOP" ]
then
   echo "Loading jbd.ko"
   insmod $BASEDIR/jbd.ko
fi

CMDOP=$(lsmod | grep ext3)
if [ -z "$CMDOP" ]
then
   echo "Loading ext3.ko"
   insmod $BASEDIR/ext3.ko
fi

if [ ! -d "/mnt/ext3" ]
then
   echo "Creating mountpoint /mnt/ext3"
   mkdir /mnt/ext3
   chmod a+rwx /mnt/ext3
fi

if [ -z "$(ls -A /mnt/ext3)" ]
then
   echo "Mounting disk"
   mount -o data=writeback /tmp/sda1 /mnt/ext3
fi

if [ -z "$(cat /tmp/smb.dir.conf | grep [[ext3]])" ]
then
   echo "Updating Samba configuration"
   echo "[ext3]
path=/mnt/ext3
include=/etc/samba/smb.def.conf
comment=ext3 disk" >>/tmp/smb.dir.conf
fi
echo "Reloading Samba"
smbd reload
echo "done"


Note: the BASEDIR is the directory in which I put the modules you supplied (it's a USB pen drive with a FAT partition), while I'm mounting the disk with data=writeback mount option because I saw that this increases performance a lot (it's not vital to have a bullet-proof journaling on this disk).

The next step will be to have another device on my LAN with a cron job which periodically connects to the home base via telnet and starts that script to ensure that the ext3 support is loaded and the disk is mounted: in this way I "simulate" in some way an auto-mount! :-)

By the way, there's another thing I really miss and maybe you can help: is there a way to have the following utilities available without chrooting the full Debian?
- dumpe2fs
- fsck.ext3
- badblocks
I tried to copy these files from the lenny-homebase.tar.gz into the ext3 partition, but when I try to run, for instance,
badblocks, I get the following error:
Code:
error while loading shared libraries: libext2fs.so.2: cannot open shared object file: No such file or directory

I tried to also copy libext2fs.so.2 in the same folder of badblocks, but it didn't help. I know that with these embedded devices usually BusyBox is used to provide such functionality in a "compacted" way, but I don't know how I could find a suitable binary version of BusyBox...

I would really appreciate any help, if you know how I could solve.

Thanks in advance,
Mauro.


Top
 Profile  
 
PostPosted: Tue May 22, 2012 10:07 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
Your binary doesn't start because it expects to find it's libraries in /lib. Maybe you can use the LD_LIBRARY_PATH environment variable to specify where the libraries are located.
Quote:
I know that with these embedded devices usually BusyBox is used to provide such functionality in a "compacted" way, but I don't know how I could find a suitable binary version of BusyBox...
You could download the GPL sources, and use the 'make menuconfig' of the provided busybox to add your functionality, and build a firmware. The builded busybox should run on your box.
(Do *not* flash the firmware, without checking first if the squashfs is the right version. On my Ubuntu box by default a too new version was used. It's not necessary to flash either, the generated busybox can run from everywhere)


Top
 Profile  
 
PostPosted: Tue May 22, 2012 12:59 pm 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
I see, but isn't then needed that either:
1) you compile on the home base, but then you need all the compiler tools on the homebase (which are not present, AFAIK)
2) you do cross-compiling on another Linux box, but then you need to know which is the target environment and cross compile also any required library

I know that cross-compiling isn't an easy job...


Top
 Profile  
 
PostPosted: Tue May 22, 2012 7:33 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
mauromol wrote:
I see, but isn't then needed that either:
1) you compile on the home base, but then you need all the compiler tools on the homebase (which are not present, AFAIK)
2) you do cross-compiling on another Linux box, but then you need to know which is the target environment and cross compile also any required library
True
Quote:
I know that cross-compiling isn't an easy job...
Depends. It's some time ago I built firmware for this box, but as far as I remember it was just extracting the GPL package, and running make. (That didn't give me a usable firmware, due to a wrong squashfs, but it certainly built a usable busybox)

But of course, using the LD_LIBRARY_PATH trick, you should be able to use the Debian binaries.


Top
 Profile  
 
PostPosted: Wed May 23, 2012 8:24 am 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
Using the LD_LIBRARY_PATH trick I see that I need at least libext2fs.so.2 and libcom_err.so.2 to run badbloacks. However now I have the error "cannot handle TLS data" when trying to load libcom_err.so.2. Any idea?

I tried to search in Internet, but I couldn't find a cause that can be similar to my situation...


Top
 Profile  
 
PostPosted: Wed May 23, 2012 1:24 pm 
Offline

Joined: Fri Apr 13, 2012 12:01 pm
Posts: 9
I think my problem is something similar to this:
http://stackoverflow.com/questions/3465 ... e-tls-data
That is: since these libraries were compiled against another kernel version (I guess that of the Debian) they don't seem to work with the kernel in the homebase... If you have other hints to try they are welcome.


Top
 Profile  
 
PostPosted: Wed May 23, 2012 1:52 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
I think you're mixing up libraries. When a library is provided in /lib there will be no complains about the library not found, although it could (will?) be the wrong version.

Use ldd to find out which libraries are needed: 'ldd programname', and provide *all* of these libraries from the same source.


Top
 Profile  
 
PostPosted: Fri Jun 15, 2012 9:35 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6047
@mauromol
You might want to have a look here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group