AndrewdAzotus
Posts: 83
Joined: Wed Feb 06, 2013 3:07 pm
Location: Canada

suggestion when setting up hostname in raspi-config

Fri May 31, 2019 7:00 pm

when setting the hostname in hostname and hosts, would you consider adding

sudo cp -v /etc/hostname /boot

then I can see which image I have if/when I insert it into a windows box :)

thanks :)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5713
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: suggestion when setting up hostname in raspi-config

Fri May 31, 2019 7:44 pm

I don't see that happening, given the very niche use case.

There are many Windows tools to access linux partitions.

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: suggestion when setting up hostname in raspi-config

Sat Jun 01, 2019 9:19 am

AndrewdAzotus wrote:
Fri May 31, 2019 7:00 pm
when setting the hostname in hostname and hosts, would you consider adding

sudo cp -v /etc/hostname /boot

then I can see which image I have if/when I insert it into a windows box :)

thanks :)


The shell version of the raspi-config utility is simply a shell script stored in /usr/bin/raspi-config.

You could modify it to meet your own requirements.

If you think it would be generally useful, you could offer to share your efforts via a Pull Request to the maintainers via https://github.com/RPi-Distro/raspi-config

AndrewdAzotus
Posts: 83
Joined: Wed Feb 06, 2013 3:07 pm
Location: Canada

Re: suggestion when setting up hostname in raspi-config

Mon Jun 03, 2019 2:08 am

there are many tools but given that i only plug my sd card into a windows box to re-image it and I do not see that it's worth installing one of those tools just to check the hostname, it seemed like a good idea to do this so that i can confirm the host name and that i have the right card before I flash it.

Raspi-config already updates hostname and hosts with the new hostname anyway, it seems such a minimal work effort addition to make.

found the script, I'll try the git options, thanks :)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5713
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: suggestion when setting up hostname in raspi-config

Mon Jun 03, 2019 8:02 am

I wouldn't recommend taking this to github, since it was already addressed here.

Return to “Raspbian”