Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installer_config.txt dhcp error #46

Closed
mpmc opened this issue Apr 21, 2014 · 10 comments
Closed

installer_config.txt dhcp error #46

mpmc opened this issue Apr 21, 2014 · 10 comments

Comments

@mpmc
Copy link

mpmc commented Apr 21, 2014

Hey folks,

Trying to install ua-netinstall on my Pi, but I'm getting the following error.

Waiting for eth0... OK
'..ifconfig: bad address' dhcp dhcp

my installer config is:

preset=server
packages= # comma separated list of extra packages
mirror=http://mirrordirector.raspbian.org/raspbian/
release=wheezy
hostname=rpi4
domainname=
rootpw=raspbian
cdebootstrap_cmdline='--flavour=minimal --include=kmod,fake-hwclock,ifupdown,net-tools,isc-dhcp-client,ntp,nano,dropbear,iputils-ping,wget,ca-certificates,inetutils-syslogd,dialog,locales,less,man-db'
bootsize=+50M # /boot partition size as given to fdisk
rootsize=     # / partition size, leave empty to use all free space
timeserver=time.nist.gov
ip_addr=dhcp
ip_netmask=0.0.0.0
ip_broadcast=0.0.0.0
ip_gateway=0.0.0.0
ip_nameservers=
online_config= # URL to extra config that will be executed after installer-config.txt
usbroot= # set to 1 to install to first USB disk
cmdline="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline"
rootfstype=ext4
rootfs_mkfs_options=
rootfs_install_mount_options='noatime,data=writeback,nobarrier,noinit_itable'
rootfs_mount_options='errors=remount-ro,noatime'```
@diederikdehaas
Copy link
Member

Sounds like you have an issue with your DHCP server.

Apart from that:

  • Do you have a preset defined (usually the first item)? If so, which?
  • Am I correct that the (only) changes you've made to the defaults are: hostname and cdebootstrap_cmdline?
  • Any particular reason that 'packages' is empty, but you (seem to) add them to cdebootstrap_cmdline? And removed openssh-server?
  • The ``` at the end of rootfs_mount_options is the result of you trying to get syntax-highlighting through GitHub Flavored Markdown?

@mpmc
Copy link
Author

mpmc commented Apr 21, 2014

My dhcp server is fine, I used the older version of ua-netinstall on another Pi a few weeks ago without any issue.

  1. Yes, it's server (Edit: Markdown hides it!).
  2. Yes
  3. I swapped it for dropbear.
  4. Yes (not sure why that failed!

Edit: Removed installer-config.txt and it's running fine, so I'm not sure what is the issue here!

@diederikdehaas
Copy link
Member

Thanks for the answers. Did you use the same config a couple of weeks ago?
Of course it shouldn't matter, but if you use a config file with only your modifications?
Like:

hostname=rpi4
cdebootstrap_cmdline='--flavour=minimal --include=kmod,fake-hwclock,ifupdown,net-tools,isc-dhcp-client,ntp,nano,dropbear,iputils-ping,wget,ca-certificates,inetutils-syslogd,dialog,locales,less,man-db'

does it result in the same error?
PS: use the backticks on a line by itself, then it should work properly.

@mpmc
Copy link
Author

mpmc commented Apr 21, 2014

Yes it was the same config, and I wasn't sure whether I had to define everything in installer-config or not so I thought it was better safe than sorry (as the saying goes).

But anyway more than likely I'm doing something wrong, so feel free to close this issue if you like and I'll try again when I have time :) 👍

@diederikdehaas
Copy link
Member

I see no reason to close it (just yet).
But now I do have a straightforward case to test myself.
When you do have time to test it again, please do report back :-)

@diederikdehaas
Copy link
Member

I just tested it with the config from #46 (comment) and all went well.
I've now also seen your edit, so I am closing this issue for now.
I'd still like to know when you tested it again (with minimal and your original installer-config.txt) what the outcome for you was. Depending on the result, we'll reopen the issue.

@mpmc
Copy link
Author

mpmc commented Apr 23, 2014

I've since done some testing.

I'd initially created the installer-config.txt on Windows, copied + pasted from the readme into Notepad++ and edited to my liking and before I saved it changed the line endings to "Unix Format" and the default encoding was UTF8 with BOM. Which obviously results in the above error.

I've since used the same config but this time used Mousepad on Linux (Xubuntu) and guess what.. It runs fine..

So it would appear that the scripts does not like how notepad++ saves the files.

So to summarize.. It's all Windows fault! =D

@diederikdehaas
Copy link
Member

On Wednesday 23 April 2014 00:54:11 Mark Clarkstone wrote:

I've since done some testing.

Awesome and thanks for reporting back :-)
Based on your findings I'll do some more tests to determine which
encoding/BOM/etc settings seem to be important to have or not to have.

So to summarize.. It's all Windows fault! =D

I should've known ;-)

Thanks for the report and finding the cause.

@Limpster
Copy link

I also experimented in the installer-config and noticed that this happens with Mac, Linux and Windows written .txt files and can be avoided by just writing with spaces

ip_addr = dhcp

instead of

ip_addr=dhcp

At least it did the trick for me :)

@diederikdehaas
Copy link
Member

Wow, that's interesting (and unexpected)!
I'll dig through the code to see if there is a logical explanation for it.
Thanks for the experimentation and reporting back 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants