What's ina a name?

wlathan
wlathan
Joined: 10 Aug 13
Posts: 7
Credit: 66253547
RAC: 0
Topic 230019

I have been supporting Einstein for several years, off and on. I have recently started playing with Raspberry Pis and have four running Einstein. However, all four are listed in my Computers list as "raspberrypi." Is there anything I can do to change these names to make them unique and so I can tell which is which? Problems occur when I must change the microSD card; it's as if I'm completely starting over on that pi and another entry is made with the name "raspberry pi." I was able to merge a few of the names, but I'm looking for a solution where I may somehow create my own names, or simply appending a digit after "raspberrypi" would work.

Many thanks,

Bill

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5872
Credit: 117524086888
RAC: 35377987

Those machines show as

Those machines show as running Debian Linux.

Just open a root terminal session and issue the command:-

hostname whatever_unique_name_you_want

If you then close the terminal session and re-open it, the prompt should now show the new name.  BOINC will pick it up and it will get communicated to the project (eventually) so your computers list should show the unique names after that happens.

Cheers,
Gary.

wlathan
wlathan
Joined: 10 Aug 13
Posts: 7
Credit: 66253547
RAC: 0

Thanks very much, Gary. That

Thanks very much, Gary. That did the trick!

 

Bill

wlathan
wlathan
Joined: 10 Aug 13
Posts: 7
Credit: 66253547
RAC: 0

The instructions provided

The instructions provided above did the trick. However, yesterday I needed to close down all my RPis. I later started them up again. And, yes, I shut them down correctly, i.e., closed all open programs and used shutdown. This morning when I looked at my statistics again, I noticed that the names for all four machines had reverted back to "raspberrypi." Is there a way to make the hostname change permanent?

TIA,

Bill

hadron
hadron
Joined: 27 Jan 23
Posts: 62
Credit: 98525698
RAC: 544488

Check for the existence of

Check for the existence of /etc/hosts on each machine. If it exists, edit it to contain the machine name you want for each one. If it doesn't exist, create it with that name as the only line in the file.

mikey
mikey
Joined: 22 Jan 05
Posts: 12680
Credit: 1839082411
RAC: 3906

wlathan wrote: The

wlathan wrote:

The instructions provided above did the trick. However, yesterday I needed to close down all my RPis. I later started them up again. And, yes, I shut them down correctly, i.e., closed all open programs and used shutdown. This morning when I looked at my statistics again, I noticed that the names for all four machines had reverted back to "raspberrypi." Is there a way to make the hostname change permanent?

TIA,

Bill 

When I did the name change on my Linux Mint  pc, an offshoot of Ubuntu, it lost my Boinc altogether, I had to change the name back to get it back up and running again. I THINK it's because Boinc was not installed in the 'generic' folders but instead in a Boinc folder inside Home.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5872
Credit: 117524086888
RAC: 35377987

hadron wrote:Check for the

hadron wrote:
Check for the existence of /etc/hosts on each machine. If it exists, edit it to contain the machine name you want for each one. If it doesn't exist, create it with that name as the only line in the file.

Yes, my bad, I should have asked him to show the contents of his hosts file - /etc/hosts.

I've never used an RPi so I don't know how 'standard' the linux setup is.  The default name that gets used after a reboot might be from either /etc/hosts or /etc/sysconfig/network.  Also the contents of /etc/host.conf might give a clue.  The default name must be in a file somewhere.  Just find which file has it and edit it there and it will automatically get used after every reboot.

 

Cheers,
Gary.

walton748
walton748
Joined: 1 Mar 10
Posts: 94
Credit: 1486720982
RAC: 2232117

Pis use to store their system

Pis use to store their system name in '/etc/hostname'. I change my systems names there by manually editing this as root (or sudo) using 'nano' (or any editor you might prefer), and reboot after. Just editing it won't trigger anything.

Using the 'hostname' command should have done the trick, as far as I thought, but I found out it does not change that file, so the name change will not survive the next boot. It appears the system initializes its name from there once on boot.

Using the 'raspi-config' command as root (or 'sudo' it for that matter) and change the name under the 'system options' part and reboot (it will explicitly ask for this) will do the trick, as this changes the file. I guess it doesn't do anything else here, really.

Caveat: I run my Pis under the Debian 10 flavour, though not BOINCing, yours seems to be 11. Still, I would check everything in the given order and see if there is a difference.

 

Regards

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.