I setup a DietPi for ODroid HC1 and installed a lot of software.
Loved it! 
But, my HC1 had a bad USB port so I had to replace the device.
Keep in mind that nothing was wrong with the OS or the software on the card.
So, I bought a second HC1 and thought the changeover would be easy.
Just pull the SD card from the first device, put the SD into the new device, and boot the new device with the old DietPi OS and software.
What really happened:
New HC1 boots, all lights show it is working correctly, and has completed the full OS boot process.
The LAN light flashes, but it never shows up on my network ( yes, I checked my router admin page, and I also pinged every IP address on my LAN, just in case – No response).
Does anyone know why device 2 would not show up on the network if I am using an SD card and DietPi OS that was originally installed on another identical machine?
Is DietPi hard-coding the MAC address or some sort of machine Identifiers that would prevent the SD card from being moved between devices?
Better yet, is there a way to tell DIetPi to use a specific fixed IP address when it boots?
Because as far as I understand, the configuration scripts in the /boot
partition are only active for the first initial boot and installation of the SD card.
Thank you for any pointers,
Tacitus
To set fixed IP you have to edit /etc/network/interfaces
Change to static (plenty of howto’s if you google)
problem with migrating a cloned card is that you now have two devices with the same SSH key and MAC assigned to the ethernet
WarHawk
To set fixed IP you have to edit /etc/network/interfaces
Change to static (plenty of howto’s if you google)
OK, thank you for letting me know that. I will try tomorrow to see if that brings it up on the network.
problem with migrating a cloned card is that you now have two devices with the same SSH key and MAC assigned to the ethernet
From my experience, normally the MAC is burned into the hardware LAN controller, but sometimes can be changed in Linux software.
I’ll keep in mind the SSH key, but for the moment the issue is the device not even coming up on the network.
I don’t think that there is a MAC conflict because the old device is already returned to ODroid corp.
But still, just in case: Is there some place in the DietPi where they are saving the device MAC to the SD card, or overriding the hardware MAC address?
Thank you,
Tact123
unknown on the mac location…
you can force it to regenerate the ssh keys and whatnot
make sure before you pull the card you do a
# shutdown -h now
I have been using
poweroff
which I think is the same as
shutdown -h now
I have been delayed by unrelated problems at work so I haven’t been able to confirm if I can fix the network issue when swapping SD cards to another machine.
When I do I will come back and update the post in case others have similar problems.
Came across this
https://raspberrypi.stackexchange.com/a/63509
You only want to randomize the last 3 octets of the MAC address so get the fixed address and do the above…this way, it randomizes the MAC of every interface every reboot…never have to worry about it again (just make sure you have for both Wlan0 and Eth0 if you use those ports…
Maybe that should be a permanent addon ? 
Unless the developers already know where it randomizes or creates them already
Also I have had issues where cards go wonky…I pull them out…put them in my linux laptop…run gparted, scan and fix the partition, then put back in…and kapow…working
I dunno…I think poweroff shuts it down right then (which means it doesn’t get a graceful closing of all the running applications)
https://www.cyberciti.biz/faq/howto-shutdown-linux/
https://askubuntu.com/questions/64995/what-is-the-difference-between-shutdown-and-poweroff-commands
https://www.tecmint.com/shutdown-poweroff-halt-and-reboot-commands-in-linux/
(yeah…I had to look it up too, I have never used the shutdown command before…hmmm)__