Welcome! Log In Create A New Profile

Advanced

Swapping usb drive between pogoplugs

Posted by allerretour 
Swapping usb drive between pogoplugs
October 02, 2012 12:09PM
Hi,

Don't know if this belongs in the Debian or uBoot section, so I'll put it here.

I have a pink Pogoplug that I put debian on by following the instructions here: http://wiki.daviddarts.com/Pogoplug

Thing worked so great (many thanks to the developers), that I decided to get another. I have asterisk,samba,apache,ftp, and a bunch of other stuff running on it. I didn't want to go through the hassle of reinstalling and reconfiguring all the s/w again, so I thought that I could just reflash the second pogo, then make a clone of my original usb using dd, and plug it right into the new one and have the same system. Before I had the pogo, I had a nslu2 slug, and that's what I was able to do with that. I'm using the exact same usb key for both systems. (size, model, make). Unfortunately, this doesn't seem to work for me. I can't seem to use a different usb key, even if it's the same model and cloned with dd. The light would go orange, but it never seemed to be able to connect to the router (despite lots of flashing on the ethernet port; I think it's probably booting correctly, but not able to join the LAN). I tried swapping my two cloned usbs back and forth between the two pogos and not only could I never get the new one to connect, but then I couldn't get the original combo (usb and pogo) to connect either.

I was always able to boot into the pogo environment (green light) wiithout the usb attached. I tried flashing the uBoot again with this (http://projects.doozan.com/uboot/) in an attempt to recover my original Debian setup, but that didn't work. I eventually had to re-do the whole installation from scratch (http://wiki.daviddarts.com/Pogoplug) to get debian again.

Just wondering if there's anything in Debian or uBoot (probably uBoot) that would be usb stick h/w dependent? Shouldn't I be able to take the debian usb, dd it to another usb, and plug the new one in with no issues? This is also how I want to do my backups. If this doesn't work, how are other people doing their backups? Thanks.



Edited 1 time(s). Last edit at 10/03/2012 09:51AM by allerretour.
Re: Swapping usb drive between pogoplugs
October 02, 2012 01:13PM
udev is detecting that you have a new Ethernet adapter and is assigning it to eth1 rather than eth0.

If you've just moving the device once, you can delete /etc/udev/rules.d/70-persistent-net.rules and it will be regenerated with the new Ethernet adapter as eth0

If you're swapping the stick back and forth, you'll want to edit that file instead and add a wildcard for the Ethernet adapter. The following line works well for swapping between my Dockstars, but you may need to adjust the mac address pattern for use on a pink pogo
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:75:1a:*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Re: Swapping usb drive between pogoplugs
October 02, 2012 09:06PM
Shoot. That sounded like it would do it, but not the case. I renamed the file you mentioned ( /etc/udev/rules.d/70-persistent-net.rules ) and rebooted, but I had the same behavior (orange light and blinking on ethernet port, but never connects). Also, afterwards, I looked at the usb and there never was a new "70-persistent-net.rules" file created.

So then I opened up that file to see what was in it. The mac address was correct for the pogo that I'm working on. I tried putting the wildcard in there nonetheless, but it still wouldn't connect. So I think it's something similar to what you mentioned, but not quite. Any other ideas?
Re: Swapping usb drive between pogoplugs
October 02, 2012 10:38PM
I believe you also need to modify /lib/udev/rules.d/75-persistent-net-generator.rules

# device name whitelist
KERNEL!="Eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
					GOTO="persistent_net_generator_end"
Re: Swapping usb drive between pogoplugs
October 03, 2012 09:42AM
Thanks both for your replies. bodhi, I wasn't sure what I was supposed to do with the file /lib/udev/rules.d/75-persistent-net-generator.rules which you mentioned. I do have exactly the same line in there that you quoted. Should I edit it somehow? I tried commenting it out, thinking that that would cause it to regenerate the "persistent-net" file, but that didn't work. I'm going to try experimenting again with a new installation using new installations and swapping cloned usbs between systems, to see what I can learn. Anyone who has had success swapping usbs between systems, please post with the necessary steps, if you remember them. Thanks.
Re: Swapping usb drive between pogoplugs
October 03, 2012 04:32PM
@allerretour,

Note the capital letter E in Eth*. Do you have a lower case eth* ?
Basically this is to remove eth* from the whitelist (i.e. to force udev to reassign eth0), in addition to what Jeff mentioned above.

# device name whitelist
KERNEL!="Eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
					GOTO="persistent_net_generator_end"
Re: Swapping usb drive between pogoplugs
October 04, 2012 07:29AM
Well, progress. I was able to swap a newly installed debian usb between two pogoplugs by using the two edits mentioned by Jeff and bodhi above:
/lib/udev/rules.d/75-persistent-net-generator.rules
/etc/udev/rules.d/70-persistent-net.rules
So somehow it works. I had to reboot a couple times after making edits to one or the other to get it to work, so I'm not sure exactly which step or combo of steps made it work, but it worked.

Now I'm trying to get the original usb (which I'd backed up to hard drive with dd) to work again on either pogo.

I had that usb assigned to static ip 192.168.1.100 also, which is free.

In addition to the steps above, I also read on another forum that you might have to modify /etc/network/interfaces and remove any mention of eth0. The post said that the system would then regenerate interfaces with a new dchp connection. They said not to touch loopback though.

So I've now got this in interfaces

Quote

#auto lo eth0
iface lo inet loopback
# iface eth0 inet dhcp

# my old static settings
#iface eth0 inet static
#address 192.168.1.100
#netmask 255.255.255.0
#broadcast 192.168.1.255
#gateway 192.168.1.1

Still no luck. I'm not sure if the interfaces edit helps or hurts. I think the essential problem is that the 75-persistent-net-generator.rules file is not being regenerated. That folder is still blank after reboot. So the changes that I'm making to 70-persistent-net.rules don't seem to be kicking that process off. I tried the capital E suggestion from bodhi and also commenting out that line completely. Any other suggestions on how I can kick that off? Thanks.
Re: Swapping usb drive between pogoplugs
October 04, 2012 08:57AM
Well, I saved a backup of /lib/udev/rules.d/75-persistent-net-generator.rules and then went through and deleted all the lines that jumped to the end of the file, in an attempt to force it to regenerate that /etc/udev/rules.d/70-persistent-net.rules file, and it still didn't do it.
Re: Swapping usb drive between pogoplugs
October 04, 2012 04:10PM
allerretour,

Keep the 2 edits as we recommended. Don't delete the line, just use the capital Eth*.

# device name whitelist
KERNEL!="Eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
					GOTO="persistent_net_generator_end"

Your /etc/network/interfaces should look like this for a static IP:

auto lo eth0 
iface lo inet loopback 
# iface eth0 inet dhcp 

iface eth0 inet static 
address 192.168.1.100 
netmask 255.255.255.0 
broadcast 192.168.1.255 
gateway 192.168.1.1

Before using the stick for the other Pogoplug, mount it on the one running and modify the static IP to a new one, and then also change hostname in /etc/hostname.
Re: Swapping usb drive between pogoplugs
October 04, 2012 10:00PM
I'm too old to be saying dudes ... but dudes, you rock. Got my stick back and it seems to be working in both pogos. Muchas gracias.
Author:

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: