Welcome! Log In Create A New Profile

Advanced

MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image

Posted by davygravy 
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
February 15, 2013 11:47AM
I shut it down and restarted to see what it would say.

DockstarNFS:~# avahi-daemon
Found user 'default' (UID 1000) and group 'default' (GID 1000).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Failed to open /etc/resolv.conf: No such file or directory
Loading service file /etc/avahi/services/p910nd.service.
Loading service file /etc/avahi/services/samba-port139.service.
Loading service file /etc/avahi/services/sftp-ssh.service.
Loading service file /etc/avahi/services/ssh.service.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.215.
New relevant interface eth0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 192.168.1.215 on eth0.IPv4.
Registering HINFO record with values 'ARMV5TEL'/'LINUX'.
Server startup complete. Host name is DockstarNFS.local. Local service cookie is 1393641444.
Service "DockstarNFS" (/etc/avahi/services/ssh.service) successfully established.
Service "DockstarNFS" (/etc/avahi/services/sftp-ssh.service) successfully established.
Service "DockstarNFS-SMB" (/etc/avahi/services/samba-port139.service) successfully established.
Service "HP PhotoSmart C4480 @ DockstarNFS" (/etc/avahi/services/p910nd.service) successfully established.

But I still don't see it on the network.
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
February 15, 2013 04:06PM
Have you tried pinging the hostname in Win 7 Command Prompt?

ping DockstarNFS.local
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
February 15, 2013 04:45PM
Ping request could not find host DockstarNFS.local. Please check the name and tr
y again.

I also tried just DockstarNFS same response.
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
February 15, 2013 05:44PM
I can ping my Dockstar's hostname using Win 7 VM command prompt just fine. Looking at your avahi startup log, it seems everything is good. I guess if you can ping it from a smartphone or a Mac then it's not the router.



Edited 1 time(s). Last edit at 02/15/2013 05:46PM by bodhi.
Hi -

I, too, am writing to thank Davy, but also to report a lack of success with SMBplug.

I downloaded the current 0.7 tar file for SMBplug linked in the first post and made a USB stick. The boot from there worked fine (unlike a lot of other USB images for my Dockstar).

I noticed a couple of odd things when I flashed the SMBplug. Here is the output. Look out for the fact that:

1. Only 23, not 25 blocks were flashed by the first portion
2. One of the output messages was at number 211, not 212, in the second portion.

Farther below, I've used netconsole to produce the looping attempts to boot from the built-in memory.

Here was the flashing sequence:
SMBPlug:/img_files# flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
SMBPlug:/img_files# nandwrite /dev/mtd1 uImage-mtd1.img
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Writing data to block 18 at offset 0x240000
Writing data to block 19 at offset 0x260000
Writing data to block 20 at offset 0x280000
Writing data to block 21 at offset 0x2a0000
Writing data to block 22 at offset 0x2c0000
Writing data to block 23 at offset 0x2e0000
SMBPlug:/img_files# flash_erase /dev/mtd2 0 0
Erasing 128 Kibyte @ 1fe0000 -- 100 % complete
SMBPlug:/img_files# ubiformat /dev/mtd2 -s 512 -f rootfs-mtd2.img -y
ubiformat: mtd2 (nand), size 33554432 bytes (32.0 MiB), 256 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 255 -- 100 % complete
ubiformat: 256 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 211 -- 100 % complete
ubiformat: formatting eraseblock 255 -- 100 % complete
SMBPlug:/img_files# reboot





U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot: 0
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=3"
UBI: MTD device size: 219 MiB
UBI: number of good PEBs: 1752
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 1731
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: done.
find_inode failed for name=uboot-original-mtd0.kwb
load: Failed to find inode
### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: done.
find_inode failed for name=uboot-original-mtd0.kwb
load: Failed to find inode
### JFFS2 LOAD ERROR<0> for uboot-original-mtd0.kwb!
resetting ...

and loop.

Any ideas what to do from here?

Thanks!
Thomas
Nevermind the message above this one.

I tried the SMBplug and the MacPlug and neither worked. Then I tried the OWFSplug and that did work! So, I tried the SMBplug and it worked that time.

Perhaps the NAND in my Dockstar is glitchy.

In any case, thanks again!
davygravy Wrote:
-------------------------------------------------------
> I'm thinking that space was _really_ limited


Now that I've been playing with SMBplug for a while, I'm wondering if it would be possible to add a few things to make it even better. If there's not space (as noted above), then so be it.

Having said that:
1. It'd be useful to attach NTFS volumes >2 TB. Right now, /tmp/messages says:
Apr 28 23:23:27 SMBPlug kern.err kernel: [ 377.530436] NTFS-fs error (device sda1): parse_ntfs_boot_sector(): Volume size (2TiB) is too large for this architecture. Maximum supported is 2TiB. Sorry.

Perhaps adding NTFS-3G would fix this?

2. Autofs or something like it would be a nice convenience.

As noted at http://dev.shyd.de/2011/01/dockstar-nas-automount-hd-idle-samba-ftp/ it'd be neat if drives would automount. (Is this supposed to happen? If so, I'm missing something. I remounted / rw and added in mount points and entries in /etc/fstab with noauto for three drives, and now it works if I ssh into the box and mount them by hand after a reboot / power outage.)

3. hd-idle and appropriate configuration files would be good, too, to both save power and disk life.


Finally, as seen from OS X, I'm getting two entries in the Finder sidebar. One is SMBPLUG and the other is SMBPlug-SMB. They both go away when I stop Avahi and I can see where SMBPlug-SMB is defined in one of the Avahi services files. The SMBPLUG entry, I thought, was coming from OS X seeing samba, but that icon also went away when I stopped /etc/init.d/S50avahi-daemon so now I'm not so sure.

I can connect to SMBPLUG with timemachine/timemachine username/password but attempting to attach to SMBPlug-SMB fails. When I hit on the Connect As... button in order to enter a username, I get "There was a problem connecting to the server SMBPlug-SMB. The server may not exist or it is unavailable at this time." etc etc. Any ideas on how to fix this?
I am having the exact same problem, I tried all 3, but no joy, getting a little frusterated

edit: turns out that rescue_installed was set to 0, booted from a stick and ran fw_setenv rescue_installed 1 and that fixed my problem



Edited 1 time(s). Last edit at 05/04/2013 09:59PM by bitz.
Bad blocks on SMBPlug install?
July 31, 2013 10:39PM
I have a Pogo-E02 and a Dockstar. On the Dockstar, the installation of SMBplug worked perfectly. So, I'm trying to set it up on the Pogo-E02, but am getting a bad block error message. At this point, it will still boot off of the USB stick that I put the SMBPlug installer upon but will not boot off of the internal NAND flash.

Any suggestions for how to fix or work around this problem?

Thanks!
Thomas

Here's what I see when I try to do the installation:

SMBPlug:~# cd /img_files
SMBPlug:/img_files# flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 3e0000 -- 100 % complete 
SMBPlug:/img_files# nandwrite /dev/mtd1 uImage-mtd1.img
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Writing data to block 18 at offset 0x240000
Writing data to block 19 at offset 0x260000
Writing data to block 20 at offset 0x280000
Writing data to block 21 at offset 0x2a0000
Writing data to block 22 at offset 0x2c0000
Writing data to block 23 at offset 0x2e0000
SMBPlug:/img_files# flash_erase /dev/mtd2 0 0
Erasing 128 Kibyte @ 14a0000 -- 64 % complete flash_erase: Skipping bad block at 014c0000
Erasing 128 Kibyte @ 1fe0000 -- 100 % complete 
SMBPlug:/img_files# ubiformat /dev/mtd2 -s 512 -f rootfs-mtd2.img -y
ubiformat: mtd2 (nand), size 33554432 bytes (32.0 MiB), 256 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 255 -- 100 % complete  
ubiformat: 255 eraseblocks are supposedly empty
ubiformat: 1 bad eraseblocks found, numbers: 166
ubiformat: flashing eraseblock 212 -- 100 % complete  
ubiformat: formatting eraseblock 255 -- 100 % complete  
SMBPlug:/img_files# 
If this is helpful, here's what it looks like when it is trying to boot from the internal flash now:

http://pastebin.com/jc8q6rEQ
Davygravy,
Nice work. After recovering my dockstar I put your macplug on my dockstar. I will be using the time machine backup drive and will be setting up my printers off this unit. I like the concept and there's something new to get familiar with. Thanks.
Paul
So the ntpd thingy isn't running and it got me to looking at whether I wanted it to run. I have a router with time on it. Why can't I pull that time? Turns out tomato does not seem to be running ntpd. I haven't figured out where it's getting its time from but it's not serving it out. So I started it on my macplug. Might as well share the load, especially if I can lighten the load on the router which is called on to use all its might to stream throughout the house.

Paul

PS I still haven't figured out how to get the timemachine to show up in my mac settings.

PPS DavyG -- is ntpd supposed to be running somewhere on the plug? I looked in all of the init.d scrips and didn't see anything. How does time get set (or is that something I am supposed to do?)



Edited 1 time(s). Last edit at 08/25/2013 03:40PM by z3bram3n.
Not even an expert but might I fathom to guess that your usb stick is at fault? Seems to have trouble fetching required parts from it.
I compiled usb_printid on my nsa320 and copied it to my macplug. I put it in temp directory and changed permissions but says its not there when I type,

/USB_printerid / dev USB/lp0

I tried other ways too but no joy. The program comes with foo2zjs (by Rick Richardson). It checks the printer for signature bits and it is used to determine whether the firmware is already installed so that it won't install it again (this has been found to cause strange behavior from this type of printer). I have come to the understanding that Read Only file system cannot be changed once it is compiled unless there is an overlay system (like openwrt maybe?).

Also what is macplug using for hot plug?
EDIT: 9/8/2013
I read up on read only file systems. You basically can't just plop a file in and execute it (compiled program). Scripts work. So adding this is going to require some effort (what@*&#). It's on my list now.

For now:

cat doc> /dev/USB/lp0

or something to the printer.

It is HP1020 and acts up if you send it more than once. So if I am not sure I power cycle the printer and resend. Haven't found the hotplug mechanism yet. Prints very nicely from macs thank you very much.

As for the backup I am still trying to get that to work. I found that one must create a sparsbundle file and do some other mac voodoo to see the remote share. Many folks report success on the web but I have yet to get TM to see my sparsebundle file on my macplug. Will update when I make some progress. There is a bit of work involved to get the nas to work with timemachine -- that is if all you are familiar with is macs. The heavy lifting has been done by davyg. But you still have to create the sparse bundle, name it properly, include all the details in the avahi config file and transfer the file to the macplug.



Edited 2 time(s). Last edit at 09/17/2013 09:23AM by z3bram3n.
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
September 18, 2013 11:42AM
davygravy Wrote:
-------------------------------------------------------

> - LibInklevel : would be great to query ink level
> in printers... unfortunately, a required libieee
> component compiles but does not function...
>
>
>
> Predefined users:
> root, password is root
> timemachine, password is timemachine

I read a comment from 2009 that said the libieee was no longer necessary that the functions were in libm. If the compiler complained take the references out of make file. I am just a talking head here.
Paul
It's been a while since I installed the macplug. I want to replace it with a debian installation to make a fax server using sendfax, efax, or hylafax. But I keep running into hurdles. Right now when I try to run the wheezy install using the script it crashes saying I need to release the MTD0 first. I tried installing the rescue system as well.
How do I procede to replace this macplug system with a debian version?
Thanks.

Edit: This is an early Dockstar. I used the "don't check uboot" to run the uboot script. That seemed to work.

Edit 2: I submitted this to the "rescue system string" so I am closing out this message.



Edited 2 time(s). Last edit at 05/05/2015 09:14AM by z3bram3n.
Re: MacPlug & SMBPLug : Mac/AFPD or Windows/SMB + Print services in a flash/NAND image
April 23, 2018 09:12PM
I have used this for quite a while now and mapped the network drive on several computers. Windows 10 no longer supports this and won't connect saying that SMB1 is obsolete and needs to be updated to SMB2. Is there an easy way to do this?

Thanks
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: