udhcpc failed to get a DHCP lease while configuring networking
#1
Thu, 2017-04-27 16:15
suiwenfeng
-
- Offline
- 11 months 1 week ago
- 2017-04-25
steps to reproduce the error.
- create bootable usb after download iso(alpine-standard-3.5.2-x86_64.iso) dd if=alpine-standard-3.5.2-x86_64.iso of=/dev/sdb - cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 iface wlan0 inet dhcp - /etc/init.d/networking restart udhcpc: started, v1.25.1 udhcpc: sending discover udhcpc: sending discover udhcpc: sending discover udhcpc: sending discover udhcpc: sending discover udhcpc failed to get a DHCP lease udhcpc: no lease, failing
the network is ok while boot to Ubuntu in the same laptop.
Also got
udhcpc failed to get a DHCP lease
while answering questions in response tosetup-alpine
, having also dd'd that iso onto a USB, booting into a HP Pavilion notepad. Later tried burning iso onto a CD-ROM with same result.setup-alpine
asked about myeth0
andwlan0
(or was thatwlan1
?), which surprised me as I had turned the wireless setting off on my router.Eventually tried running
setup-interfaces
on its own first, but this was overwritten bysetup-alpine
, as I think may be indicated in the Wiki. Tried various efforts, but these may not be appropriate, e.g. using static addresses but not setting router with a static address.Someone reported needing to do a hard reset while not getting a dhcp lease (https://bugs.alpinelinux.org/issues/6705 for a wireless connection) and that inserting
udhcpc_opts -b
on the last line of
/etc/network/interfaces
helped. I used vi to try that, but that doesn't give me a lease.Is this a bug for users not installing on a virtual machine?
Am able to connect even though I appeared to have the same problem as in the original post. The following may not be the most elegant, but I am not an advanced user. Instead of running
setup-alpine
first:1. Ran
setup-interfaces
first, answering "done" when asked about wlan0, as not required.2. Partly applied https://wiki.alpinelinux.org/wiki/Configure_Networking:
hostname -F /etc/hostname
but not sure if this is necessary, and although tried to change the hostname by doing theecho "shortname" > /etc/hostname
instruction, this seemed to add an extra line to the hostname file and so I left the hostname aslocalhost
.3.
/etc/init.d/networking --quiet start &
and had to force out of this (I am not advanced!) usingCtr
+C
.4.
ifup eth0
but not sure if this was necessary.(I could then do
setup-alpine
but answered "done" when asked about my eth0 (and wlan0?) setting, and "[]" about my DNS settings.Note: Steps 1 or 2 to 4 had to be redone on reboot even after installing to disk.
Maybe a coder could clarify what's really necessary, if that can help. There haven't been many replies to some posts though - too busy coding, perhaps!