inindev / nanopi-r5

stock debian arm64 linux for the nanopi r5c & r5s
GNU General Public License v3.0
100 stars 17 forks source link

Images have /etc/machine-id set. #17

Closed RemkoMolier closed 1 year ago

RemkoMolier commented 1 year ago

Hi,

after long searching for why my two nanopi-r5s where generating the same mac addresses for the openvswitch setup, I figured out this was because of the /etc/machine-id being the same for both nanopi-r5s.

Would it be possible to regenerate the machine-id on first boot?

rm -f /etc/machine-id && dbus-uuidgen --ensure=/etc/machine-id

Thank you in advance!

inindev commented 1 year ago

What release are you using? The machine-id has not been set in the past few: https://github.com/inindev/nanopi-r5/blob/main/debian/nanopi-r5s/make_debian_img.sh#L167-L168

In any case, just delete the file and it will get automatically regenerated on the next boot.

RemkoMolier commented 1 year ago

I am using your latest release, directly on nvme.

inindev commented 1 year ago

Thank you for this report. I have verified this is an issue with the image:

wget https://github.com/inindev/nanopi-r5/releases/download/v12.0.1/nanopi-r5s_bookworm-1201.img.xz
xz -d nanopi-r5s_bookworm-1201.img.xz
sudo mount -n -o loop,offset=16M nanopi-r5s_bookworm-1201.img /mnt
cat /mnt/etc/machine-id
512e938faf4449bdabef0c5f82325488

I need to dig-in and figure out how this regressed.

inindev commented 1 year ago

I checked-in the fix and will rebuild the images soon. The bug was referencing "machine.id" and not "machine-id" in the script: https://github.com/inindev/nanopi-r5/commit/df411251698494326b8306507053d793a870b96b#diff-7e92b5f85fb433782de18bf25a27cbfb2e4f406a4dade21f0460f0fb6652194fR168

RemkoMolier commented 1 year ago

Thank you for the work you put in collecting the resources and providing the scripts. It is helping me finally use these devices properly.

inindev commented 1 year ago

addressed in 12.0.2: https://github.com/inindev/nanopi-r5/releases/tag/v12.0.2