Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: aug on March 30, 2016, 02:46:44 AM

Title: Change the hostname
Post by: aug on March 30, 2016, 02:46:44 AM
How can this done????

- i have edited /etc/hostname
 => nothing
- used sudo hostname xxx
 => changed hostname but after a reboot its reset to box

I both cases i had added /etc/hostname to .filetool.lst and executed filetool.sh -b before rebooting.

Title: Re: Change the hostname
Post by: bmarkus on March 30, 2016, 02:58:28 AM
Add host=xxx to /mnt/mmcblk0p1/cmdline.txt
Title: Re: Change the hostname
Post by: aug on March 30, 2016, 03:02:37 AM
Hm.... can i do this on a running system?
Title: Re: Change the hostname
Post by: Greg Erskine on March 30, 2016, 03:37:37 AM

Yes

Sent from my iPad using Tapatalk HD
Title: Re: Change the hostname
Post by: aug on March 30, 2016, 03:57:43 AM
but how???  mmcblk0p1 is empty after booting....
Title: Re: Change the hostname
Post by: bmarkus on March 30, 2016, 04:08:02 AM
but how???  mmcblk0p1 is empty after booting....

Mount it
Title: Re: Change the hostname
Post by: jncl on March 30, 2016, 07:25:16 AM
Hi aug,

  You can also change the hostname from box by editing the line which says
Code: [Select]
/usr/bin/sethostname box in
Code: [Select]
/opt/bootsync.sh and then running
Code: [Select]
filetool.sh -b to save the changes.

HTH
  Jon
Title: Re: Change the hostname
Post by: Paul_123 on March 30, 2016, 08:14:37 AM
Hi aug,

  You can also change the hostname from box by editing the line which says
Code: [Select]
/usr/bin/sethostname box in
Code: [Select]
/opt/bootsync.sh and then running
Code: [Select]
filetool.sh -b to save the changes.

HTH
  Jon

This method does not work with DHCP environments, unless you don't care if the router gets the correct hostname advertisement.

Setting it commandline is more reliable.
Title: Re: Change the hostname
Post by: onelife on January 19, 2018, 02:51:55 AM
Hi all,

I know this is an old thread, but I'm trying to change the name that shows on the network? This is not the hostname from what I can see but perhaps the device name? How would you do that? I'm trying to define a unique name that if a user did a network "sniff" they would see the custom name. Any ideas :)

Thank you!
Title: Re: Change the hostname
Post by: Rich on January 19, 2018, 05:33:37 AM
Hi onelife
... I'm trying to change the name that shows on the network? This is not the hostname from what I can see but perhaps the device name? ...
I think the hostname is what goes out on the network, and that defaults to  box. What name are you seeing?
Title: Re: Change the hostname
Post by: onelife on January 19, 2018, 07:03:27 AM
At the moment I see "Raspberry" and "Raspberry Pi" on the network search. So perhaps this is linked to the vendor name? Or actual product name when you "search" on a network? That's the name I'm trying to update - That's if it's possible?

Thanks
Title: Re: Change the hostname
Post by: Paul_123 on January 19, 2018, 10:40:52 AM
Nothing in piCore is going to broadcast Raspberry pi.    If your sniffing and seeing raspberry pi, then that is your sniffing program converting the MAC address to a real vendor name. 

If you are using wireshark, then take a look here https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf

Title: Re: Change the hostname
Post by: Rich on January 19, 2018, 10:57:56 AM
Hi Paul_123
Now it makes sense. It never occurred to me that Raspberry pi would have their own vendor code.
Title: Re: Change the hostname
Post by: sodface on January 19, 2018, 12:18:26 PM
onelife doesn't specify whether his pi is connected via WIFI or wired LAN.  I would guess the B8:27:EB OUI would only be applicable to wired interfaces (not USB ones though)?
Title: Re: Change the hostname
Post by: Greg Erskine on January 19, 2018, 01:32:04 PM
I think the manufacturer for "B8:27:EB" is "Raspberry Pi Foundation" and this applies to wired and built-in wireless.
Title: Re: Change the hostname
Post by: sodface on January 19, 2018, 02:33:15 PM
I think the manufacturer for "B8:27:EB" is "Raspberry Pi Foundation" and this applies to wired and built-in wireless.

Yes, thanks for the clarification.  Should have checked my pi zero w before posting.
Title: Re: Change the hostname
Post by: patrikg on January 20, 2018, 02:53:03 AM
Yes thats correct.
Code: (bash) [Select]
B8-27-EB   (hex) Raspberry Pi Foundation
B827EB     (base 16) Raspberry Pi Foundation
Mitchell Wood House
Caldecote  Cambridgeshire  CB23 7NU
US
See the file http://standards-oui.ieee.org/oui.txt