Assign Static IP to kiosk
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Assign Static IP to kiosk
Post#1 by rh102801 » 09 Jul 2014, 13:49
I tried creating an rc.inet1.conf file and placing it in the rootcopy/etc/rc.d directory with the following information but it did not work:
# Config information for eth0:
IPADDR[0]="192.168.23.130"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]="Testkiosk"
Thanks in advance
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#2 by fanthom » 09 Jul 2014, 14:56
kiosk wont understand this config and you must do everything in commands. please add this code to /etc/rc.d/rc.local (make it executable) so it will run as last:
Code: Select all
#!/bin/sh
killall dhcpcd 2>/dev/null
ifconfig eth0 192.168.23.130 netmask 255.255.255.0
route add default gw gateway_IP eth0 #change gateway_IP to your gateway
hostname Testkiosk
fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#3 by rh102801 » 09 Jul 2014, 17:36
As usual excellent instructions. I tested this and the IP address part worked great however the Hostname didn't take as it is still using the default "porteus" hostname.
Do you have any ideas as to why it is not recognizing that hostname?
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#4 by fanthom » 09 Jul 2014, 19:40
i have logged through ssh, ran 'hostname test' command and hostname changed from 'porteus' to 'test' immediately.
please make sure you have 'hostname some_name' and not 'Hostname some_name' in your rc.local.
fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#5 by rh102801 » 09 Jul 2014, 20:10
Would it use different files when using the Wizard?
I also tried creating an ISO from the Wizard and then modifying it with my NTP customization and local HTML files but when I mount the ISO I don't see the porteus directory I was expecting. I do see boot, docs, make_iso.sh, xzm. On version 3.0 I would see boot and porteus when mounting the ISO so work with it.
Is version 3.1 somehow different from 3.0 as far as what the ISO contains?
Sorry if this is a stupid question, I just didn't expect to see this when mounting the ISO
Thanks
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#6 by rh102801 » 09 Jul 2014, 20:11
I'll post again as soon as I've tested.
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#7 by fanthom » 10 Jul 2014, 08:52
you have to create one. i'll add a blank rc.local to next release so people will know where to put their custom commands.I tried looking at the rc.local file to see how it was using the hostname provided during the wizard but there is no rc.local.
thanks
yes - kiosk 3.1 is a major upgrade over 3.0 and you should have a look on the changelog i posted:Is version 3.1 somehow different from 3.0 as far as what the ISO contains?
http://porteus-kiosk.org/changelog-releases.html
please mind especially this part:
(no more /rootcopy).- Kiosk ISO content was simplified with three folders only: /boot, /docs and /xzm.
- PXE boot does not support /rootcopy functionality so this folder was removed. From now on all files must be kept in the xzm modules.
fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#8 by rh102801 » 10 Jul 2014, 12:16
This explains a lot... I kept thinking I had done something wrong with my ISOrh102801 wrote:- Kiosk ISO content was simplified with three folders only: /boot, /docs and /xzm.- PXE boot does not support /rootcopy functionality so this folder was removed. From now on all files must be kept in the xzm modules.

I guess I'll read over the documentation when I get a chance to familiarize myself with all the changes.
Thanks Again
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#9 by rh102801 » 10 Jul 2014, 13:19
I am not sure if we are on the same page.... I can run hostname TestKiosk on my system from ssh as well and it will change the name right away but I was expecting the name to be what I have on rc.local. See below for my system's config:fanthom wrote:it works for me:
i have logged through ssh, ran 'hostname test' command and hostname changed from 'porteus' to 'test' immediately.
please make sure you have 'hostname some_name' and not 'Hostname some_name' in your rc.local.
root@porteus:~# cat /etc/rc/d/rc.local
#!/bin/sh
ifconfig lo up
ntpdate pool.ntp.org
sh /etc/rc.d/rc.ntpd start
killall dhcpd 2>/dev/null
ifconfig eth0 192.168.23.130 netmask 255.255.255.0
route add default gw 192.168.23.1 eth0
hostname TestKiosk
I expected the system to show root@TestKiosk based on the entries above. If I manually change the hosname like you described earlier:
root@porteus:~# hostname TestKiosk
root@TestKiosk:~#
This is expected behaviour however this is a manual change from SSH and is not persistant as rebooting the machine will bring it back to root@porteus:~#
Does this make sense? I am not sure if I am conyeing my thoughts in the right way. My thought is that by entering the line hostname TestKiosk in the rc.local, the system would take that name on bootup however it is coming up as porteus:
root@porteus:~# hostname
porteus
Changing it manually from an ssh session won't be a persistent change and the system will default back to porteus on reboot.
I hope this makes sense
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#10 by fanthom » 10 Jul 2014, 13:55

i wanted to check if changing hostname is working ok when done manually. you have a correct command in rc.local but a mistake in 'killing dhcpcd' line.
please use this:
Code: Select all
killall dhcpcd 2>/dev/null
fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#11 by rh102801 » 10 Jul 2014, 16:02

I have tried correcting the line and recreated the ISO but now the system is not booting..... I will try creating the ISO again and will let you know how it goes.
Thanks again for all your help
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#12 by rh102801 » 11 Jul 2014, 19:51
The other thing is even after correcting the typo on my rc.local entries, the hostname I defined is still not being used. Do you have any other ideas on this?
root@porteus:~# cat /etc/rc.d/rc.local
#!/bin/sh
ifconfig lo up
ntpdate pool.ntp.org
sh /etc/rc.d/rc.ntpd start
killall dhcpcd 2>/dev/null
ifconfig eth0 192.168.23.130 netmask 255.255.255.0
route add default gw 192.168.23.1 eth0
hostname TestKiosk
I think I might dedicate my weekend on trying to figure out how to port my ntp customizations to the new 3.1 kiosk (I am going to miss rootcopy) since I can use the wizard to create an image for any of the devices I have and would get rid of this problem easily although I still don't understand why it is not using the hostname at all.
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#13 by fanthom » 11 Jul 2014, 20:03
yes - please add this code at the begining of rc.local:Would I define a DNS server on rc.local as well?
Code: Select all
echo 'nameserver 8.8.4.4' > /etc/resolv.conf
i think it's still dhcpcd playing role so we could add some sleep before running 'hostname xxx' but it will be better to not start dhcpcd at all. please edit /etc/rc.d/rc.M and comment out these lines:even after correcting the typo on my rc.local entries, the hostname I defined is still not being used. Do you have any other ideas on this?
Code: Select all
# Initialize the networking hardware:
for x in `ls /sys/class/net | egrep -v 'sip|lo'`; do
dhcpcd -L -t 0 $x >/dev/null 2>&1 &
done
it must work now

fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Assign Static IP to kiosk
Post#14 by rh102801 » 14 Jul 2014, 14:04
# Initialize the networking hardware:
[ -x /etc/rc.d/rc.inet1 ] && . /etc/rc.d/rc.inet1
Also I found this line:
# Set hostname:
hostname porteus
Could the hostname not be changed in this file instead?
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Assign Static IP to kiosk
Post#15 by fanthom » 14 Jul 2014, 18:16
probably it could. please do it and check (feel free to experiment with kiosk a bit).Could the hostname not be changed in this file instead?
fanthom