Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: nim108 on November 17, 2011, 08:18:03 PM
-
I am running into a strange issue that could be related to filesystems-3.0.3-tinycore.tcz and/or dependency mtd-3.0.3-tinycore.tcz in regards to mounting a smb/cifs share.
At first, I thought smbmount was a command included in the samba3.tcz package, so I did not add any additional extensions, but upon realizing it was not, I got the extensions mentioned above and used mount -t cifs to mount the Windows share (also realized that mount -t smbfs was now deprecated). Mounting was fine, I could read / write to the filesystem. However, TCL crashes after a few minutes of mounting a CIFS share by printing a stack trace. I know this is related to mounting because if I don't mount anything CIFS related, TCL stays up just fine. I've also tried different shares on different laptops and I get the same behavior so I'm thinking it must be something with the extension? I don't need the cifs-utils package, do I? If anyone else is running into this issue, I'd love to hear about it because the stack trace tells me nothing to diagnose the problem.
-
Hi nim108
The samba package does come with mount.cifs, however, if you are not looking to run a server
you don't need it, cifs-utils.tcz should be all you need to connect to a share.
-
Sounds like a bug in the kernel's cifs module. There have been some 5 commits in the 3.0.x series to cifs, perhaps you could try 3.0.9?
-
Sounds like a bug in the kernel's cifs module. There have been some 5 commits in the 3.0.x series to cifs, perhaps you could try 3.0.9?
Could you link me to this? Are you saying there is an updated filesystems / mtd extension in the TC repo here: http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/ (http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz/) because I don't see it. Please clarify, thanks. Again, at the moment, I am not using the cifs-utils extension but only the ones mentioned above since I only need to mount a Windows share in TCL and not run a server.
-
I mean the upstream linux kernel 3.0.9, from kernel.org.
-
I mean the upstream linux kernel 3.0.9, from kernel.org.
Hate to sound like a noob, but I will have to rebuild it for compatibility for TCL then? It can't be as easy as swapping out the vmlinuz file or is it?
http://wiki.tinycorelinux.net/wiki:custom_kernel (http://wiki.tinycorelinux.net/wiki:custom_kernel) <-- guess I am following this guide?
-
Yes, you'd need to build it. The wiki page looks ok.
-
Going to be a challenge for me, but I'll give it a shot. Any plans to upgrade the kernel in TCL anytime soon? This is not a total emergency, I can always wait it out, I am just kinda curious if it will fix CIFS crashes (or if the kernel is even the cause of it). Thanks.
-
Any plans to upgrade the kernel in TCL anytime soon?
Not in this cycle, no.
-
Fair enough, and no other alternatives to mount Windows shares besides "mount -t cifs" with filesystems and mtd extensions correct? If so, I will try to compile TC for 3.0.9 this weekend and see how it goes.
-
Yes, things will go through the kernel even with cifsutils/samba.
-
Hi nim108
Try removing the samba package and installing cifs-utils instead. Then mount using
sudo mount.cifs //IP_Address/dir /mnt/mountpoint
I just went to the 4.0 repository and looked at the samba3.tcz.list file and mount.cifs is NOT listed
in there so maybe the busybox mount is handling it and doing something weird.
-
Rich, will do, but according to curaga, either one will go through the kernel so that seems to be a moot point (though I will certainly try it). Also, I need the samba3 extension for the rpcclient command to remote reboot the Windows client after I'm done modifying some files on it, which was to be done through the CIFS share. If there's any other way to remote reboot it, I'm all ears because the samba3 package alone is 30 MB which totally bloats my customized initrd. I can try adding the cifs-utils extension on top though and use the mount.cifs command (I was trying to avoid using this extension since it depends on so many other packages). Are you saying mount.cifs is not the same as mount -t cifs? Also, if neither of these suggestions work, I will try downgrading to TCL 3.8.4 (which uses the 2.6.33 kernel IIRC) just to confirm it is a kernel issue.
-
Hi nim108
Also, I need the samba3 extension for the rpcclient command to remote reboot the Windows client
Once your mount problems are resolved, you can grab rpcclient, libtalloc, libtdb,and libwbclient from
the samba package. The remaining libs that rpcclient relies on may already be on your system but
heres a list anyway.
tc@BitBucket:~$ ldd /usr/local/bin/rpcclient
linux-gate.so.1 => (0xb7f0c000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7b3b000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb7b25000)
libdl.so.2 => /lib/libdl.so.2 (0xb7b21000)
libpopt.so.0 => /usr/local/lib/libpopt.so.0 (0xb7b17000)
libtalloc.so.1 => /usr/local/lib/libtalloc.so.1 (0xb7b11000)
libtdb.so.1 => /usr/local/lib/libtdb.so.1 (0xb7b06000)
libwbclient.so.0 => /usr/local/lib/libwbclient.so.0 (0xb7afa000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7ae6000)
libc.so.6 => /lib/libc.so.6 (0xb79ad000)
/lib/ld-linux.so.2 (0xb7f0d000)
That should get you down to about 4Meg.
-
^ Awesome, thanks! The support here is great and definitely appreciated. I will try out all the suggestions and report back. Worst case I will just go back to TCL 3.8.4 if it turns out to be a kernel bug with CIFS with TCL 4.x.
-
With the release of Core 4.2 which adds a lot of new features (the biggest being modularity), I figured I'd take another shot at this. I recompiled the latest 3.0.x kernel, which is 3.0.9 and applied all the TC patches. I also built and copied over all the modules from 3.0.9 that TC 4.2 (kernel 3.0.3) uses. This all boots up just fine. Upon doing this, I realized that cifs is not even a module in the default TC initrd. When I built the 3.0.9 modules, I saw the cifs module in /kernel/fs/cifs but TC does not use it (only modules in /kernel/fs are fat, ntfs, and squashfs). Therefore, is this problem not kernel related but extension? Or am I missing something? Also, with me running 3.0.9, are the 3.0.3 extensions like filesystems-3.0.3-tinycore.tcz compatible? I would assume not.
-
Yes, the existing module extensions are incompatible. You can just copy the cifs module from your build, or alternatively create your own set of extensions (see the sorter script next to the kernel source on the mirror).
-
Yes, the existing module extensions are incompatible. You can just copy the cifs module from your build, or alternatively create your own set of extensions (see the sorter script next to the kernel source on the mirror).
Thanks! I was wondering what the sorter.sh script was for, worked great and I got my filesystems-3.0.9-tinycore.tcz and mtd-3.0.9-tinycore.tcz extensions generated. I will test this out at work next week and see if kernel still crashes.
Quick question, with me using a newer kernel, are the lib extensions also incompatible? For example, if I were to use the cifs-utils extension from the 4.x repository, would libcap and libattr still work? Thanks. This has been a fun little side project to diverge to.
-
Only module extensions are affected (those with a kernel version in the name).
-
Thanks! I was wondering what the sorter.sh script was for, worked great and I got my filesystems-3.0.9-tinycore.tcz and mtd-3.0.9-tinycore.tcz extensions generated. I will test this out at work next week and see if kernel still crashes.
Quick question, with me using a newer kernel, are the lib extensions also incompatible? For example, if I were to use the cifs-utils extension from the 4.x repository, would libcap and libattr still work? Thanks. This has been a fun little side project to diverge to.
I think that I'm also experiencing this issue. I'm using MC (now just C?) as a PXE server, once the clients boot they auto-mount a CIFS share and more often than not will kernel panic. I can cause those that don't panic immediately to panic simply by un-mounting the share.
Would you be willing to post the 3.0.9 kernel and extensions so that I can test them?
-
I decided to have a go at compiling the 3.0.9 kernel (initially I tried 3.1.7 but it wouldn't compile and I didn't have time to thoroughly investigate why).
The custom kernel wiki entry seems a little out of date but using it combined with a few forum posts got me a compiled kernel. I then ran the sorter script and got my module extensions. I then extracted the base modules and cpio'd, gzipped and advdef'd (as in the remastering wiki page) the folder structure then added it to the initrd string in the isolinux.cfg (so it now reads "/boot/core.gz, /boot/modules309.gz").
The result - everything worked fantastically and no more kernel panics when working with the CIFS module. I've tested it on about 25 machines and they all seem happy mounting and unmounting shares.
Are there any issues with doing it the way that I have? Shall I post a bug report regarding the CIFS module?
-
Are there any issues with doing it the way that I have?
No, your way is fine. That way you can upgrade TC easily.
Shall I post a bug report regarding the CIFS module?
No need.
-
Oops, forgot to post my results here. legsak1mbo basically said it. 3.0.9 with the 3.0.9 modules works great and resolves the kernel panic issue when mounting CIFS shares. I'm glad I did not try a later kernel like 3.1.7 because that probably would have not worked.