OUR NETWORK:TiVoCommunity TechLore MyOpenRouter Dijit Community MediaSmart Home See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 1366400.0
February 19, 2011 04:40 PM

Categories: PogoPlug Development

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

Rok Carl

Member
Joined: 02/17/2011

Hi everyone!

I have a Pogoplug Pro and a USB hard drive attached (Question 1: what's the difference between a USB drive and USB flash?). I just want to have Samba support and also keep my.pogoplug.com functionality. That's all. So I figured that this PlugComputers tutorial from Oddballhero will be great.

I can move around Linux, but don't expect/assume too much ;). I've read the tutorial several times but some things I still don't understand.
Question 2: what's the overview of my process, is it like this (I'm sure it's not so please correct this): I connect my USB drive, mount it to /opt, install ipkg and wget on this drive, then install samba, then configure Pogoplug (rcS) to always mount the drive to /opt (what does that help?). Where in this process should I format the drive?

Question 3: how can I format the drive? fdisk command is not found! EDIT: now the fdisk command works (after I've done all the below stuff). Why is that?

When I followed the instructions, something weird happened. When I installed ipkg, this happened:
/opt/lib # ipkg update
ipkg: error while loading shared libraries: libipkg.so.0: \
cannot open shared object file: No such file or directory
/opt/lib # ls
libipkg.so.0
Question 4: what's going on and how can I fix this?

I tried fixing this problem and it seemed to work, but is it okay?
/opt/lib # cp libipkg.so.0.0.0 libipkg.so.0 
/opt/lib # ipkg update
Successfully terminated.
Question 5: is this okay?

Then I installed samba and when I tried to run it, this happened:
/ # /opt/etc/init.d/S80samba
Starting smbd:
/opt/sbin/smbd: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
Question 6: how can I fix this?

So I thought I should start anew. Typed fdisk /dev/sda, then deleted a EFI GPT partition and then created a new primary partition (for System it now says Linux - it doesn't say ext2 or ext3). When I try to finish partitioning (write), this happens:
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
Question 7: what now?

Discussion:    Add a Comment | Comments 1-25 of 30 | Latest Comment | 1 2 Next »

February 20, 2011 10:14 AM updated: February 20, 2011 10:34 AM

1. http://en.wikipedia.org/wiki/USB_flash_drive
2. The instructions are at http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/readme.txt or to repeat quickly:
a. Partition the drive with "/sbin/fdisk /dev/sda".
b. Format the drive with mke2fs (if you want ext2 use the built in /sbin/mke2fs. if you want ext3, you may want to download the mke2fs in http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ which should have all the files you actually need and use ./mke2fs -j /dev/sda1 if sda1 is your drive.
c. Create /opt with "mkdir /opt". Then "mount /dev/sda1 /opt" and verify that it mounted with "mount". You should see that /dev/sda1 is mounted on /opt.
d. You can now download ipkg in / and uncompressed it there which will place ipkg in /opt/bin/ipkg which you verify with ls -la /opt/bin/ipkg. If it is not there you may have downloaded ipkg and uncompressed it in /opt which would give you /opt/opt/bin/ipkg and that is incorrect. That is why I made a tar install file on http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ called plug.tar.gz that has ipkg, wget, and nano already included and can be uncompressed directly on the usb drive (/opt). Just to make sure that you did unpackaged the files correctly you should type "ls -la /opt" and you should see bin, etc ... but no opt under /opt.
e. Then create your /etc/profile with the path that includes /opt/bin:/opt/sbin in front of the other directories in you path. Then reboot so that the system should pick up the new wget in /opt/bin/wget. Or copy it into /usr/bin/wget.
f. After the reboot, mount /dev/sda1 into /opt again and try "ipkg update".
g. if this works you can download from http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ mount_optext2 or mount_optext3 and add this to rcS or add the mount command itself in rcS with a "/bin/sleep 10" before it.
3. I don't know why you couldn't find /sbin/fdisk since it comes with all the pogoplugs, and I am not the one typing the command on your system. Also, fdisk is for partitioning drives, mke2fs is for formatting drives.
4. I am not sure how you unpackaged the ipkg tar file but in /opt/lib if you did "ls -la", you should have something like:
drwxr-xr-x 7 root root 140 ..
drwxr-xr-x 2 root root 100 .
-rwxr-xr-x 1 root root 150260 libipkg.so.0.0.0
lrwxrwxrwx 1 root root 16 libipkg.so.0 -> libipkg.so.0.0.0
lrwxrwxrwx 1 root root 16 libipkg.so -> libipkg.so.0.0.0
5. The package should have it already for you. What you did is to copy it over to the name that ipkg can find but it takes up more space. You could have types "ln -s /opt/lib/libipkg.so.0.0.0 /opt/lib/libipkg.so.0" which is a symbolic link. I just unpackaged ipkg on my system to verify the integrity of the file and I have all three. You got ipkg to work but I would question how you unpackaged the file (hopefully with tar xzvf) and if your path statement in profile was correct. Type "set" and that should show the path and other variables.
6. You can try "ls -la /opt/lib" and see if libnsl.so.1 is located there since you did not show that above. Optware packages usually default to /opt/lib to look for library packages. You may want to try adding an /opt/lib to your path statement just to make sure.
7. As mentioned in the warning in the the Optware install page, if you are not comfortable with your Linux skills, don't perform this installation or get somebody physically there to help you that knows Linux. When Linux is using a mounted drive (which you probably did in rcS), it won't let you partition this. So if you want to repartition /dev/sda1, you need to not mount it in rcS (you shouldn't partition a mounted drive), reboot, and not run anything from it. Where did your drive come from and how large is it (was this a boot drive, you may have problems with this since other users have had problems with GPT partitioned drives, google this, it may require extra steps to erase the GPT partition. If it is over 2 TB you may need to keep the partition.)? It looks like you did not initially partition and formatted it. Also fdisk will not show ext2 or ext3 since that is a function of mke2fs for formatting (fdisk is for partitioning it does not care about the format, only partition type). Fdisk will show that it is a Linux partition of type 83, which can be used for ext2 or ext3. Mke2fs will format it for ext2 unless you want a journal then using "-j" will create ext3 (which is the same as ext2 with a journal).

So the fact that you got samba installed to a certain extent is a good sign, you just need to repeat what you have done after partitioning and formatting which could have been your problem all along and check the existence of the libraries and paths. When you do start samba, it should be "/opt/etc/init.d/S80samba start". You can then verify if it runs with "ps |grep samba" and smbd -D should be running. Then you have to make sure that your smb.conf has the correct settings. If you are using a Mac OSX system, you may want to make sure to set the password to encrypt in smb.conf or you won't be able to log in when you do go->connect to server.

Addendum:
You may want to place optware on a flash drive and just use your original drive for data (the actual shared drive).

February 21, 2011 8:42 AM updated: February 21, 2011 8:47 AM

Yes, somehow I got most of the things right. But Samba is still not working for me, still this lib is missing, it's very weird. I've searched on Google, but couldn't find an answer. Many suggested somehow trying to solve the problem with ldd (to find out where other libraries are) and find (to find the library), but both are missing (guess they're not in Busybox Linux).
Here's my session.

[root@PogoplugPro init.d]# ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.
[root@PogoplugPro init.d]# ipkg install samba
Package samba (3.2.15-4) installed in root is up to date.
Nothing to be done
Successfully terminated.
[root@PogoplugPro init.d]# /opt/etc/init.d/S08samba start
Starting nmbd:
/opt/sbin/nmbd: error while loading shared libraries: libnsl.so.1: \
cannot open shared object file: No such file or directory
Starting smbd:
/opt/sbin/smbd: error while loading shared libraries: libnsl.so.1: \
cannot open shared object file: No such file or directory

What can I do?

February 21, 2011 12:14 PM updated: February 21, 2011 12:26 PM

Dude, the problem was stated above. I already gave you the solution in the paragraph before the addendum. You need to format your drive because for Linux package libraries to work, the system has to be able to create symbolic links and yours is not doing it. You in effect created a hard link to solve ipkg (actually copy) but it has to work for every package you download from optware, like samba. So now ipkg is trying to create a symbolic link and it can't for libnsl.so.l, which needs to be linked to libnsl-2.5.so. I don't know who the many are that you are asking but the problem comes back to being able to use "ln -s" to create symbolic links, so they should have been able to tell you. Hence you have to format your drive for a linux file system or these packages will not work. Any other Linux distribution is the same. So format the drive and start over or else you won't be able to upgrade later. You did not provide the results of "ls -la" on /opt/lib which would have shown what libraries were downloaded. That would have been another clue that symbolic links were created. You should have followed the last paragraph before the addendum and maybe the addendum if you don't want to format the hard drive. The command "find" is actually a package in optware along with other Linux enhancements but that requires symbolic links also.

If you don't feel comfortable with this, then try Plugapps, or Debian, you can chroot into both.

February 21, 2011 1:39 PM updated: February 21, 2011 1:44 PM

Sorry for not providing the info, I'm pasting it now.
I have formatted it correctly (at least I think): pasted session.

This is the output of ls -la /opt/lib/: paste.

I also am able to create symbolic links: paste.

I tried to find (without the find command - i.e. manually) this libnsl.so.1, but couldn't. Should I try installing find. Or do you have any other suggestions?

Note that I formatted (fdisk and then mke2fs) the USB drive using the Pogoplug Pro. I.e. I didn't connect it first to some other system and once done connect it to Pogoplug Pro.

February 21, 2011 8:22 PM updated: February 21, 2011 11:57 PM

Cool Carl, now were getting somewhere. Your good! I see formatting to ext2 allowed you to get symbolic links and now libipkg.so.0 is a symbolic link and not a copied file anymore. Now the next big question, which samba package did you use since there is a bunch of them. My preference, and the only one in optware I use is samba2 which is lightweight and has everything I need to connect to other machines. By the way, a little tutorial on ipkg. Typing "ipkg" will get you all the commands. Typing "ipkg list|grep packagenameyouwant", helps you find packagenameyouwant. Typing "ipkg status|more", tells you what has been installed and dependencies. Typing "ipkg remove packageIdontwant" will remove packageIdontwant. Type "ipkg info packageinfoIwant" will give me information on the package I want. So say I want to install "find", then "ipkg list|grep find" which would give me:

ack - 1.94-1 - grep-like text finder
bsdmainutils - 6.1.6-5 - Small programs many people expect to find when they use a BSD-style Unix system.
findutils - 4.2.32-1 - File finding utilities
findutils-doc - 4.2.32-1 - Documentation for file finding utilities
fslint - 2.26-1 - A utility to find and clean various forms of lint on a filesystem.
mlocate - 0.23.1-1 - A merginging locate program to find files fast
perl-file-next - 1.02-1 - File::Next is a lightweight, taint-safe file-finding module. It is lightweight and has no non-core prerequisites.
powertop - 1.12-2 - PowerTOP is a Linux tool that helps you find programs that are consuming extra power when your computer is idle.

Then from this I would do "ipkg install findutils" and I would end up with find plus more.

Say I am trying to look for a library that some other package may have forgotten to include like libnsl.so.1. Then I would do "ipkg list|grep libnsl" which would give me:
libnsl - 2.5-4 - Network Services Library

Then "ipkg info libnsl" would in my case give this information"
Package: libnsl
Version: 2.5-4
Conflicts: uclibc
Status: install user installed
Section: util
Architecture: arm
maintainer: NSLU2 Linux
MD5Sum: d989616ab6e62e2e677fb6e3d27db4e8
Size: 42529
Filename: libnsl_2.5-4_arm.ipk
Source: /
Description: Network Services Library

Here is a link to the ipkg tutorial:
http://www.dd-wrt.com/wiki/index.php/Ipkg

Since I believe that you are now on your way to being a good Linux warrior, my other suggestions are procps and coreutils. Or to cite one of the lines on my installation page for the Pro:
6. Due to older busybox, would be a good idea to install "procps", "coreutils", "bash", "findutils", and "psmisc".

Another suggestion is to use swat which should be helpful for setting up samba through the web. It is automatically installed with samba2.
http://www.nslu2-linux.org/wiki/Optware/SWAT

Then if you follow above directions, you can set up samba by going through the web page:
http://IP-address-of-your-PlugPro:901

Typing "ifconfig" will give you the ip address of your plug for eth0.

So thank you for the extra information and hopefully this helps.
Good Luck!

Addendum:
You might need to update your services file if you use swat or some other utilities http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/services

February 22, 2011 12:04 AM

While the topic is being discussed, I wonder if you might weigh in on something. I'm following this thread because I'm at the point where I'm ready to tackle what Carl's been working on, once I have some time to hack. I'm trying to decide what to use for storage for /opt. I currently have a 2GB USB Flash drive (black Friday freebie from Staples) sitting around doing nothing, and I also have an 80GB IDE in a USB enclosure. I have separate larger drives that I intend to use for the actual storage, right now I'm just trying to decide what to use for /opt. Any reason that the 2GB flash drive might not be sufficient? The 80GB is old, slow, and loud, and I had been planning to retire it. Thanks for the advice.

Tony

February 22, 2011 2:27 AM updated: February 22, 2011 3:13 AM

Tizzo,
The 2GB USB Flash (thank you for not making me explain USB flash again) is way more than adequate for /opt. Optware packages really don't take up much space (could probably use an old 256MB or 512MB for samba2 with plenty of spare fun stuff). Use the guide at http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/readme.txt and use the file plug.tar.gz at http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ to install the base system. You can do this in 5 to 10 minutes (ok, I can, I don't know about you). Just remember to install samba2 and use the ipkg guide above in case of any problems. Swat would probably be worth it since the biggest pain for newbies is setting up samba in smb.conf. That requires running xinetd. Swat is one of the utilities called by webmin.

Addendum (gotta have one)
When in doubt, google/bing/yahoosearch it.
Some Swat images from other Linux Sources:
http://www.howtoforge.com/samba-fileserver-with-swat-fedora8-p2
http://www.samba.org/samba/docs/using_samba/ch02.html
http://www.techrepublic.com/article/administering-samba-using-swat-for-window...
Here is an example of a user installing samba2:
http://diis.net/front/2010/09/05/installing-samba-on-your-pogoplug/

February 22, 2011 3:54 AM updated: February 22, 2011 4:00 AM

Quickie xinetd swat configuration:

SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.

1. First install samba2.

2. Create a root password for Samba because you will need this to log in to the SWAT interface:
Type "smbpasswd -a root"

3. Xinetd is needed to initialize the swat service after samba2 is installed so install xinetd.
Type "ipkg install xinetd"

4. Edit with vi or nano /opt/etc/xinetd.conf.
Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)

5. Edit /opt/etc/xinetd.d/swat and insert the line "protocol = tcp" below the "socket_type = stream" line and edit the only_from line to match the xinetd.conf file.

Here is what the resulting "swat" file approximately looks like:
service swat
{
port = 901
socket_type = stream
protocol = tcp
wait = no
only_from = localhost 192.168.xxx.xxx/24
user = root
server = /opt/sbin/swat
log_on_failure += USERID
disable = No
}

6. Now we need to install the protocols and services file from http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ but first we need access to the root file system since it is read only:
Type "mount -o rw,remount /"

7. Change to /etc directory with "cd /etc" and download the 2 files with:
"wget http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/services"
"wget http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/protocols"

8. Now Start xinetd (notice you do not have to append start):
Type "/opt/etc/init.d/S10xinetd"

9. Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

10. If you want to always have swat accessible or are using xinetd for any other communication utility then place S10xinetd in your rcS or mount_optextX file. If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you.

February 22, 2011 9:29 AM

Thanks Oddball. Quick followup - I have a Dockstar, which I presume (since I can see drives as Windows shares) already has some flavor of Samba running on it. Is there any good reason to install the Optware Samba2 package? Will it give me anything that the existing Dockstar software doesn't?

February 22, 2011 12:11 PM updated: February 22, 2011 5:01 PM

Well, If your happy with it, it's fine (why then even bother about being ready to "tackle what Carl's been working on"?). I am assuming that you are using the my.pogoplug.com service or the .ceid trick. But what if something happens to the pogoplug service and you want to tighten up security to you dockstar? I don't remember them using an smb.conf (you may want to search for that). So it depends how much control you want. By the way, try killall hbwd. See if your samba shares are still up. I also can switch between their dropbear and optware openssh when I want my dockstar to be secure. I actually have several commands that can cut the umbilical cord between my optware boxes and cloudengines since I use them for business purposes. Some of the suggestions I've seen on other sites to disable cloudengines services don't really work. I was at one time connected to my dockstar by usb serial and had implemented their suggestions and I was watching as files were being downloaded to upgrade the firmware. There is also probably a reason why actual pogoplugs, other than dockstars, don't offer samba connectivity. And yet the code is already available to them and they don't implement it even with so many complaints that people want samba.

So how did your Apache/Webdav combo pan out?
My lighttpd/Webdav worked out for me.

February 22, 2011 5:42 PM

OddballHero said:
So how did your Apache/Webdav combo pan out? My lighttpd/Webdav worked out for me.

Not there yet unfortunately.  Just haven't had time.  This is "recreation" for me, and that's been taking a back seat for now.  I'll let you know how it goes though.

February 25, 2011 6:22 AM

Hmmm, still the same problem with libnsl.so.1 missing.
I followed this nslu2 optware tutorial for installing samba2. When I run "S80samba start", I get the same error as before.

[root@PogoplugPro /]# /opt/etc/init.d/S80samba start
Starting smbd:
/opt/sbin/smbd: error while loading shared libraries: libnsl.so.1:\
cannot open shared object file: No such file or directory
Starting nmbd:
/opt/sbin/nmbd: error while loading shared libraries: libnsl.so.1:\
cannot open shared object file: No such file or directory

So I installed findutils, but find couldn't find a libnsl file.
[root@PogoplugPro /]# find / -name libnsl
[root@PogoplugPro /]#

February 25, 2011 2:13 PM updated: February 25, 2011 2:14 PM

So Carl, referring back to my post on http://www.pogoplugged.com/forum/thread/15812/Optware-problems-on-Pogoplug-Pr... earlier in the week (guess nobody reads these things). Did you install it? I thought you had this solved days ago. Here, cut and paste this "ipkg install libnsl".

February 28, 2011 5:11 PM

Yeeees... Now it all works (Samba). So let me recap all the things I had to do in addition to the instructions, so someone later can follow these. I went through the whole procedure twice, cause I had to setup another Pogoplug Pro for a family member.

  1. Even though I had my disk formatted as ext2, somehow the libipkg.so.0 was missing from /opt/lib. So I just copied it (cp /opt/lib/libipkg.so.0.0.0 /opt/lib/libipkg.so.0). I know it's funny but it works :).
  2. Even though I followed the instructions, I couldn't run fdisk because the command was not found. I just imagined that my version of Busybox Linux was so stripped down that it didn't include it. But once I installed findutils I found out that I have it in /sbin/fdisk. And I was scratching my head :). So either use /sbin/fdisk or include it in $PATH.
  3. Yeah, like Oddballhero said, you have to run "ipkg install libnsl" for Samba to work. Also, use the samba2 package (ipkg install samba2).

Hope that helps someone. And thanks to you Oddballhero - I don't know if I would finished this without your help!

March 1, 2011 11:21 AM

Rok Carl said: Yeeees... Now it all works (Samba). So let me recap all the things I had to do in addition to the instructions, so someone later can follow these. I went through the whole procedure twice, cause I had to setup another Pogoplug Pro for a family member.
  1. Even though I had my disk formatted as ext2, somehow the libipkg.so.0 was missing from /opt/lib. So I just copied it (cp /opt/lib/libipkg.so.0.0.0 /opt/lib/libipkg.so.0). I know it's funny but it works :).
  2. Even though I followed the instructions, I couldn't run fdisk because the command was not found. I just imagined that my version of Busybox Linux was so stripped down that it didn't include it. But once I installed findutils I found out that I have it in /sbin/fdisk. And I was scratching my head :). So either use /sbin/fdisk or include it in $PATH.
  3. Yeah, like Oddballhero said, you have to run "ipkg install libnsl" for Samba to work. Also, use the samba2 package (ipkg install samba2).
Hope that helps someone. And thanks to you Oddballhero - I don't know if I would finished this without your help!

Please, future users, dont copy, use `ln -s` to link it. 

Glad to see you got it working. And yeah, the Pro's $PATH is only /bin:/usr/bin

March 21, 2011 10:50 PM updated: March 21, 2011 11:32 PM

Edit: Disregard, I got it. I had to stop the Pogoplug service, then I could umount the drive and fdisk, mke2fs, etc. Next step will be to load Optware on it, but that will have to wait til next time.

Thanks.



So, I finally have a minute to try this, and I'm stuck on step number 1.

fdisk can't open /dev/sdb1 unless it's mounted. If I eject the drive, it disappears from fdisk -l, and fdisk /dev/sdb1 reports "Cannot open".

It obviously seems useless to even try to partition while mounted.

On the theory that eject does more than just umount, I also tried doing a umount of the mountpoint for /dev/sdb1 (/tmp/.cemnt/sdb1), and I get "Cannot umount", because "device or resource is busy". Which I suppose does strongly indicate that eject!=umount, but still leaves me unable to get past step 1...

Thanks.


Following up, on a whim I tried using Disk Manager on Windows, with similar results. While the disk is mounted, I can do everything Disk Manager lets you do to a disk except delete the partition. Once I eject it, Disk Manager doesn't even know about it. I suspect that it's some detail related to USB drives that I'm missing...

March 22, 2011 8:44 AM

tizzo said: Thanks Oddball. Quick followup - I have a Dockstar, which I presume (since I can see drives as Windows shares) already has some flavor of Samba running on it. Is there any good reason to install the Optware Samba2 package? Will it give me anything that the existing Dockstar software doesn't?

I think I may have found a reason on my own to replace whatever's already there with samba2.  I started using my Dockstar in earnest for the first time the past few weeks, and I've noticed that in some scenarios, when writing to a Samba share on the Dockstar, I reliably get data corruption.  The scenarios I've tested so far involve zipping a large archive using 7zip with the output file on the Samba share, and converting audio files using WinAmp's Format Converter, again with the output going direclty to the Samba share.

If I complete either operation to a local HDD and then upload to the share, everything seems fine.  I've done some limited testing saving directly to the Dockstar through the PogoPlug Drive app, and that also seems to work, but is slower.  All of which leads me to suspect DockStar's SMB implementation.  So I think I'll be trying Samba2 after all...

March 22, 2011 1:15 PM

My general suggestions are if your network consists mostly of Windows/Linux then use samba2 (Although I use samba3 on OpenWrt) due to resources (you can also try NFS). If you network consists mostly of Macs, then use netatalk. Definitely make sure to umount or eject drives before shutting off the pogoplug. These things are basically real computer systems and need an orderly shutdown to keep files from corrupting. I occasionally hook up my drives to my desktops to do filesystem checks and maintenance. We were discussing webdav a while back and that was really easy with lighttpd (uncomment a module and point to the site/share). It took longer to setup which login security to use (htpasswd, htdigest, SSL).

March 23, 2011 12:20 AM

OddballHero said: My general suggestions are if your network consists mostly of Windows/Linux then use samba2 (Although I use samba3 on OpenWrt) due to resources (you can also try NFS). If you network consists mostly of Macs, then use netatalk. Definitely make sure to umount or eject drives before shutting off the pogoplug. These things are basically real computer systems and need an orderly shutdown to keep files from corrupting. I occasionally hook up my drives to my desktops to do filesystem checks and maintenance. We were discussing webdav a while back and that was really easy with lighttpd (uncomment a module and point to the site/share). It took longer to setup which login security to use (htpasswd, htdigest, SSL).

Thanks man, I really appreciate all the advice.  I'm really starting to like this little device too.  It's giving me all kinds of ideas...

Anyway, couple more questions...

1.  What (if any) are the consequences of having rcS invoke mount_optext2 if my /opt drive happens not to be plugged into my Dockstar?  Looking at the script, it appears if it doesn't find a drive with a /bin directory, it just falls through leaving everything find and dandy, but just making sure.

1a.  Also, the directions in the linked text file say to invoke this at the end of rcS - but it seems to me that at this point, hdplug service will already have started, and mounted the drive for it's own use.  Am I missing something?

2.  lighttpd web site says that in order to use ssl, you need to compile openssl into the package.  Do you happen to know if the OptWare package has openssl compiled in?  If not, have you by any chance ever tried installing the GNU toolchain on a Pogoplug and using it to build a package from source?  (My main purpose for wanting webdav is to have a way to access my Dockstar from outside the house without necessarily using the Pogoplug service or their Pogo Drive software, and I'd like to do so securely).

March 23, 2011 3:04 PM

1. Try the script and see, just keep the root file system read only. You are reading the script, see what it does. As it is written, it just mounts a drive. Please see the warning and disclaimer at the top of http://www.nslu2-linux.org/wiki/Main/PlugComputers .

2. If you are having problems or apprehensions with the script above, don't try installing lighttpd unless you can get local help from somebody that can help set up the system for you. The information for building packages are at http://www.nslu2-linux.org/wiki/Optware/PlugComputers but is more complicated than setting up packages, so again, I would advise getting some expert local help. Towards the end of http://www.nslu2-linux.org/wiki/Main/PlugComputers is a list of distributions and sites such as Plugapps, Debian, et al., you can see if they are more suitable for you. See http://www.pogoplugged.com/forum/thread/15413/PlugApps-and-My-Pogoplug-integr... .

March 25, 2011 12:56 AM

OK, once I stopped being a wuss, I got samba2 along with SWAT up and running no problem.  Now that I'm to the point where I have to decide how to set up my shares, I've got another question - one to which I think I know (and don't like) the answer.

Does anyone know if there is any rhyme or reason as to which drive gets which device name when the Dockstar is turned on?  I'm positive that my /opt drive was showing up as /dev/sdb at one point.  Right now, it's /dev/sda.  And I see no reason to assume that it won't go back to /dev/sdb at some future reboot.  The mount_optext2 script seems to aknowledge this (it cycles through the first slice on each of /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd looking for one with an /opt/bin directory on it).

My concern is that, especially if you're doing directory-level shares, you need to know which disk is mounted at which mount point.  I've currently got two drives connected, and am trying to devise a system that is not brittle in the face of adding more drives, or having the disks assigned different device names on the next power-up.

I'm assuming that the .ceid and other files on each drive is how the Pogoplug keeps track of which drive is which.  Does anyone know of any documentation or anything that would allow for safely and reliably using this information to identify specific drives?  Or am I going to be writing a script to do the same thing as mount_optext2 to identify my shares?  Thanks.

March 25, 2011 2:34 AM

Well in lieu of any other ideas, you can just adapt the mount_xxx scripts that looks for a directory or the one in http://www.nslu2-linux.org/wiki/HowTo/TimeMachineBackups that looks for a file (any file you choose; like disk1, disk2, ....). Put it at the end of mount_optext2. That is what I do for my time machine backups and it seems to work pretty well. Everything seems to load correctly. I do the same thing with the drive that I keep my web site on.

April 3, 2011 11:42 PM

Hmmm. Think I may have screwed something up here.

I was having trouble getting Samba2 to give me the correct access to my drives. It was looking like the fmask/dmask on the mount point, being set to 22, was preventing anyone but the owner (root) from creating directories or files. I changed my mounting script, but the drives still got mounted as 22, and denied me access, no matter what I did in my script.

So I figured the PogoPlug service might be to blame, since it was mounting my drives with the 22 mask before I got around to mounting them for Samba. So I decided to try disabling the PogoPlug service - by commenting out the line in rcS that starts it. Now, I can't seem to get in. The light on my Dockstar blinks green for a few seconds, then blinks orange perpetually. I can ping, but not telnet or ssh.

My guess at this point is that dropbear is started along with the PogoPlug service, and that by turning off one, I turned off the other. Anyone know if this is correct, and if so, any ideas on how to fix it? Thanks.

April 4, 2011 8:40 AM

Yeah, that happens on the Pro, so it's possible it happens on the dockstar too. Only way I personally know to fix it is with a serial cable.

April 4, 2011 11:51 AM

Actually I might have a way around it. I do have rcS running the Samba startup script (S80samba.sh?), which is on my /opt drive. I believe this is being reached because Samba appears to be starting, and this partition is on removable media so I can gain access to it from outside my Dockstar.

Anyway, can someone refresh my memory as to the exact name of the script that starts the Pogoplug services? It is in /etc/init.d, and is something like hbmgr.sh, or hbpmgr.sh. I'm hoping if I invoke it at the beginning of S80samba.sh I'll be able to restore ssh access. Thanks.

Discussion:    Add a Comment | Back to Top | Comments 1-25 of 30 | Latest Comment | 1 2 Next »

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window