You can change the “Player Name” (hostname or computer name) of your new Volumio device even before powering it up. This is especially useful when you already have one in your home network and you want to add another, without any duplicate names.
Follow the instructions in https://volumio.org/get-started/:
- DOWNLOAD VOLUMIO
- FLASH IT
Before you start with the “PREPARE IT” instructions, here’s what you need to do
If you’re using Linux this is easy, but Windows does not usually understand Ext formatted partitions, so alternatively you can pop the card in a USB slot on you Pi or other Volumio device. For bash command line instructions to do this quickly and simply see the end of this post
Look at the partitions on your newly flashed SD card, and you will see:
In the volumio_data partition, which is empty for now, create new folders: dyn and dyn/etc and in dyn/etc create two files: hostname and hosts with the following contents (substituting YourDeviceName of course):
127.0.0.1 localhost YourDeviceName ::1 localhost ip6-localhost ip6-loopback YourDeviceName ip6-YourDeviceName ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Now when you continue with the “PREPARE IT” instructions (insert your SD card into your volumio device, power on and wait a couple of minutes), then move on to “CONNECT TO IT” use http://YourDeviceName.local, http://YourDeviceName.lan, or simply http://YourDeviceName according to your LAN configuration.
Now go into Settings / System, and you will see it says Player Name: YourDeviceName.
I presume this same technique will work if you want to set up Wifi as per CONFIGURE VOLUMIO WIFI ON PI WITHOUT USING CABLED ETHERNET https://volumio.org/forum/configure-volumio-wifi-without-using-cabled-ethernet-t3953.html as long as you put the config files in dyn/etc, and this should allow for a completely headless setup - headless, but very tuneful!
I discovered this technique thanks to this explanation of how the squash is used https://volumio.org/forum/music-card-raspi3-volumio-rc1-t4185.html#p18854, and decided to post this guide as I searched but could find no means of setting the device name before first use. I tested it successfully from an Ubuntu PC using the disk image of Volumio 2.041 for Raspberry Pi.
Here is the bash code to do this in seconds from a Linux box. Just set your NEWHOSTNAME= whatever you want
# Set your new hostname (Player Name) here NEWHOSTNAME=YourDeviceName # This should be the default location that your SD card automounted to, but change it if not MEDIA_ROOT=/media/$USER/volumio_data sudo mkdir -p $MEDIA_ROOT/dyn/etc sudo tee $MEDIA_ROOT/dyn/etc/hosts <<EOF! 127.0.0.1 localhost $NEWHOSTNAME ::1 localhost ip6-localhost ip6-loopback $NEWHOSTNAME ip6-$NEWHOSTNAME ff02::1 ip6-allnodes ff02::2 ip6-allrouters EOF! sudo tee $MEDIA_ROOT/dyn/etc/hostname <<EOF! $NEWHOSTNAME EOF!