Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Transfer File System to a Different Box (1 reply)

$
0
0
I have a Pogo Mobile (Kirkwood) running Bohdi's Debian kernel and file system (4.4) as a streaming player that works very well. It took a fair amount of time to get the ALSA sound system installed and working with a USB DAC and the Squeezelite player client. I wanted to set up a Pogo E02 the same so I installed the file system from the Mobile backup onto a new USB stick. It didn't boot because the E02 uses a different DTS file than the Mobile; I should have checked this. (Both the boxes are running an older U-Boot.) I rebuilt the kernel with the correct DTS and it booted (green light on) but didn't get a network address, so no SSH. I found a thread on here from another user that tried this and Bohdi pointed out a problem with the udev rules and conflicting MAC addresses:

Quote

When you use an existing rootfs to boot another identical box, you will need to make sure the udev rules for persistent-net are removed or modified. This usually causes network problem because of conflicting MAC address.

To make it really simple, remove these 2 files (or rename them to *.save so that they will be regenerated by udev using the new MAC address) before mounting to the other box:
/etc/udev/rules.d/70-persistent-net.rules
/lib/udev/rules.d/75-persistent-net-generator.rules

I renamed the two files as suggested, but it still did not get on the network. There was a clue in dmesg (read from the stick in another Linux box) where it showed that the eth0 device was renamed to eth1. I looked at the 70-persistent-net.rules file again and found that the old definition from the Mobile was still there as eth0 and the new definition from the E02 was assigned to eth1. Since there was no definition for eth1 in /etc/network/interfaces, it didn't work. Also, the generator file had not been recreated; I renamed the old one back to the original name. I commented the line from the Mobile, moved the stick to the E02 and it got the network connection. Working 70-persistent-net.rules snippet:
# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:31:05:be:f1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# Unknown net device (/devices/platform/mv643xx_eth_port.0/net/eth0) (mv643xx_eth_port)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:31:00:bd:cf", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

In the best troubleshooting tradition of changing two things at once, I also changed the interfaces file to specifiy the MAC address using the the hwaddress line in the static ip section. So, I'm not certain which one fixed it, but I'm pretty sure it was the udev rules.

All is fine now after sorting out a couple of USB DAC issues. I thought I'd post this in case anyone is thinking of doing something like this.

Viewing all articles
Browse latest Browse all 3247

Trending Articles