0

Raspberry Pi was configured as WiFi AP with static IP. Dynamic IP allocation is done by using udhcpd server. However dhcp server is not starting on boot after I added to /etc/rc.local following line: sudo service udhcpd start (also tried sudo update-rc.d udhcpd enable command). That line was placed inside default show IP loop. When system up and running there is no issues with manual dhcp start from terminal. How could I fix it?

Update:

sudo update-rc.d udhcpd enable default output:

sudo update-rc.d udhcpd enable default
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: enable action will have no effect on runlevel default
update-rc.d: error: no runlevel symlinks to modify, aborting!

dmesg output:

[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.11-v7+ (dc4@dc4-XPS13-9333) (gcc     version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi 2 Model B
[    0.000000] cma: Reserved 8 MiB at 0x3a800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 241664
[    0.000000] free_area_init_node: node 0, pgdat 8080f480, node_mem_map ba093000
[    0.000000]   Normal zone: 1888 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 241664 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (8620->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 10 pages/cpu @ba061000 s11456 r8192 d21312 u40960
[    0.000000] pcpu-alloc: s11456 r8192 d21312 u40960 alloc=10*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239776
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa21041 bcm2709.serial=0xe40e301 smsc95xx.macaddr=B8:27:EB:40:E3:01 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 940832K/966656K available (5722K kernel code, 397K rwdata, 1748K rodata, 384K init, 763K bss, 25824K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xbb800000 - 0xff000000   (1080 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80753a48   (7471 kB)
[    0.000000]       .init : 0x80754000 - 0x807b4000   ( 384 kB)
[    0.000000]       .data : 0x807b4000 - 0x808174bc   ( 398 kB)
[    0.000000]        .bss : 0x808174bc - 0x808d6254   ( 764 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:608
[    0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
[    0.000014] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns
[    0.000038] Switching to timer-based delay loop, resolution 52ns
[    0.000332] Console: colour dummy device 80x30
[    0.001768] console [tty1] enabled
[    0.001819] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001901] pid_max: default: 32768 minimum: 301
[    0.002309] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002369] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003646] Initializing cgroup subsys memory
[    0.003737] Initializing cgroup subsys devices
[    0.003791] Initializing cgroup subsys freezer
[    0.003840] Initializing cgroup subsys net_cls
[    0.003905] Initializing cgroup subsys blkio
[    0.004015] CPU: Testing write buffer coherency: ok
[    0.004134] ftrace: allocating 19614 entries in 58 pages
[    0.052507] CPU0: update cpu_capacity 1024
[    0.052583] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.052624] [bcm2709_smp_prepare_cpus] enter
[    0.052779] Setting up static identity map for 0x528478 - 0x5284ac
[    0.112413] [bcm2709_boot_secondary] cpu:1 started (0) 17
[    0.112724] CPU1: Booted secondary processor
[    0.112732] [bcm2709_secondary_init] enter cpu:1
[    0.112785] CPU1: update cpu_capacity 1024
[    0.112794] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.132391] [bcm2709_boot_secondary] cpu:2 started (0) 18
[    0.132649] CPU2: Booted secondary processor
[    0.132656] [bcm2709_secondary_init] enter cpu:2
[    0.132689] CPU2: update cpu_capacity 1024
[    0.132698] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.152468] [bcm2709_boot_secondary] cpu:3 started (0) 18
[    0.152711] CPU3: Booted secondary processor
[    0.152718] [bcm2709_secondary_init] enter cpu:3
[    0.152747] CPU3: update cpu_capacity 1024
[    0.152755] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.152849] Brought up 4 CPUs
[    0.152970] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.153003] CPU: All CPU(s) started in SVC mode.
[    0.154012] devtmpfs: initialized
[    0.178848] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.180841] pinctrl core: initialized pinctrl subsystem
[    0.183961] NET: Registered protocol family 16
[    0.189587] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.190763] bcm2709.uart_clock = 3000000
[    0.193535] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.193589] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.193644] mailbox: Broadcom VideoCore Mailbox driver
[    0.193778] bcm2708_vcio: mailbox at f300b880
[    0.194140] bcm_power: Broadcom power driver
[    0.194182] bcm_power_open() -> 0
[    0.194209] bcm_power_request(0, 8)
[    0.694889] bcm_mailbox_read -> 00000080, 0
[    0.694921] bcm_power_request -> 0
[    0.695063] Serial: AMBA PL011 UART driver
[    0.695213] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    1.203319] console [ttyAMA0] enabled
[    1.275630] SCSI subsystem initialized
[    1.279645] usbcore: registered new interface driver usbfs
[    1.285317] usbcore: registered new interface driver hub
[    1.290786] usbcore: registered new device driver usb
[    1.297700] Switched to clocksource arch_sys_counter
[    1.333342] FS-Cache: Loaded
[    1.336579] CacheFiles: Loaded
[    1.351132] NET: Registered protocol family 2
[    1.356782] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    1.364040] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    1.370742] TCP: Hash tables configured (established 8192 bind 8192)
[    1.377214] TCP: reno registered
[    1.380490] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    1.386475] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    1.393200] NET: Registered protocol family 1
[    1.398248] RPC: Registered named UNIX socket transport module.
[    1.404192] RPC: Registered udp transport module.
[    1.408963] RPC: Registered tcp transport module.
[    1.413681] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.421105] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    1.429518] bcm2708_dma: DMA manager at f3007000
[    1.434309] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[    1.444126] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    1.450651] audit: initializing netlink subsys (disabled)
[    1.456124] audit: type=2000 audit(1.239:1): initialized
[    1.477744] VFS: Disk quotas dquot_6.5.2
[    1.482052] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.491593] FS-Cache: Netfs 'nfs' registered for caching
[    1.498028] NFS: Registering the id_resolver key type
[    1.503205] Key type id_resolver registered
[    1.507400] Key type id_legacy registered
[    1.512602] msgmni has been set to 1853
[    1.518403] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.526041] io scheduler noop registered
[    1.530018] io scheduler deadline registered (default)
[    1.535517] io scheduler cfq registered
[    1.542062] BCM2708FB: allocated DMA memory fac00000
[    1.547077] BCM2708FB: allocated DMA channel 0 @ f3007000
[    1.558127] Console: switching to colour frame buffer device 82x26
[    1.570067] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
[    1.579377] uart-pl011 dev:f1: no DMA platform data
[    1.586404] vc-cma: Videocore CMA driver
[    1.591932] vc-cma: vc_cma_base      = 0x00000000
[    1.598203] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.605123] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.624066] brd: module loaded
[    1.634499] loop: module loaded
[    1.639433] vchiq: vchiq_init_state: slot_zero = 0xba800000, is_master = 0
[    1.648603] Loading iSCSI transport class v2.0-870.
[    1.655954] usbcore: registered new interface driver smsc95xx
[    1.663321] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.870944] Core Release: 2.80a
[    1.875560] Setting default values for core params
[    1.881856] Finished setting default values for core params
[    2.089307] Using Buffer DMA mode
[    2.094083] Periodic Transfer Interrupt Enhancement - disabled
[    2.101458] Multiprocessor Interrupt Enhancement - disabled
[    2.108586] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.114493] Dedicated Tx FIFOs mode
[    2.119866] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xbac14000 dma = 0xfac14000 len=9024
[    2.132823] FIQ FSM acceleration enabled for :
[    2.132823] Non-periodic Split Transactions
[    2.132823] Periodic Split Transactions
[    2.132823] High-Speed Isochronous Endpoints
[    2.155767] dwc_otg: Microframe scheduler enabled
[    2.155840] WARN::hcd_init_fiq:412: FIQ on core 1 at 0x803d98b4
[    2.163393] WARN::hcd_init_fiq:413: FIQ ASM at 0x803d9c10 length 36
[    2.171301] WARN::hcd_init_fiq:438: MPHI regs_base at 0xbb80a000
[    2.178916] dwc_otg bcm2708_usb: DWC OTG Controller
[    2.185405] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    2.194289] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    2.201410] Init: Port Power? op_state=1
[    2.206889] Init: Power Port (0)
[    2.211950] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.220364] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.229185] usb usb1: Product: DWC OTG Controller
[    2.235432] usb usb1: Manufacturer: Linux 3.18.11-v7+ dwc_otg_hcd
[    2.243149] usb usb1: SerialNumber: bcm2708_usb
[    2.250125] hub 1-0:1.0: USB hub found
[    2.255458] hub 1-0:1.0: 1 port detected
[    2.261367] dwc_otg: FIQ enabled
[    2.261382] dwc_otg: NAK holdoff enabled
[    2.261393] dwc_otg: FIQ split-transaction FSM enabled
[    2.261432] Module dwc_common_port init
[    2.261824] usbcore: registered new interface driver usb-storage
[    2.269655] mousedev: PS/2 mouse device common for all mice
[    2.277317] bcm2835-cpufreq: min=600000 max=900000
[    2.283984] sdhci: Secure Digital Host Controller Interface driver
[    2.291752] sdhci: Copyright(c) Pierre Ossman
[    2.297881] DMA channels allocated for the MMC driver
[    2.337744] Load BCM2835 MMC driver
[    2.344580] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.355831] ledtrig-cpu: registered to indicate activity on CPUs
[    2.365834] hidraw: raw HID events driver (C) Jiri Kosina
[    2.373169] usbcore: registered new interface driver usbhid
[    2.380422] usbhid: USB HID core driver
[    2.387157] TCP: cubic registered
[    2.393137] Initializing XFRM netlink socket
[    2.400077] NET: Registered protocol family 17
[    2.406286] Key type dns_resolver registered
[    2.415871] Registering SWP/SWPB emulation handler
[    2.423151] registered taskstats version 1
[    2.429012] vc-sm: Videocore shared memory driver
[    2.435192] [vc_sm_connected_init]: start
[    2.441370] [vc_sm_connected_init]: end - returning 0
[    2.449108] Waiting for root device /dev/mmcblk0p2...
[    2.457882] Indeed it is in host mode hprt0 = 00021501
[    2.467649] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.482905] mmc0: new high speed SDHC card at address aaaa
[    2.490580] mmcblk0: mmc0:aaaa SU08G 7.40 GiB
[    2.498176]  mmcblk0: p1 p2
[    2.571992] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.583315] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.592930] devtmpfs: mounted
[    2.598228] Freeing unused kernel memory: 384K (80754000 - 807b4000)
[    2.637840] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.646400] Indeed it is in host mode hprt0 = 00001101
[    2.848151] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    2.856852] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.866748] hub 1-1:1.0: USB hub found
[    2.872484] hub 1-1:1.0: 5 ports detected
[    3.157955] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.278252] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.287350] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.300047] smsc95xx v1.0.4
[    3.362052] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:40:e3:01
[    3.618011] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[    3.652824] udevd[175]: starting version 175
[    4.947860] usb 1-1.3: New USB device found, idVendor=2084, idProduct=270d
[    4.958474] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.967732] usb 1-1.3: Product: PictImager
[    4.973692] usb 1-1.3: Manufacturer: Etron Technology, Inc.
[    5.197845] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[    5.325255] usb 1-1.5: New USB device found, idVendor=148f, idProduct=5370
[    5.334121] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.343405] usb 1-1.5: Product: 802.11 n WLAN
[    5.349687] usb 1-1.5: Manufacturer: Ralink
[    5.355711] usb 1-1.5: SerialNumber: 1.0
[    5.432623] media: Linux media interface: v0.10
[    5.458446] Linux video capture interface: v2.00
[    5.530914] uvcvideo: Found UVC 1.00 device PictImager (2084:270d)
[    5.533485] cfg80211: Calling CRDA to update world regulatory domain
[    5.632863] input: PictImager as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
[    5.645740] usbcore: registered new interface driver uvcvideo
[    5.653248] USB Video Class driver (1.1.1)
[    5.717976] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg
[    5.838594] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[    5.869745] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[    5.899895] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    5.901914] usbcore: registered new interface driver rt2800usb
[    7.317658] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    7.560496] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    9.224001] random: nonblocking pool is initialized
[   14.800945] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   14.871207] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   14.880617] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[   15.321565] 8021q: 802.1Q VLAN Support v1.8
[   15.324516] Adding 102396k swap on /var/swap.  Priority:-1 extents:2 across:2134012k SSFS
[   78.670891] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
  • When you say you tried update-rc.d, did you put it in rc.local or did you execute it manually? (You should be able to remove everything from rc.local and run sudo update-rc.d udhcpd enable default manually once then reboot... That'll enable the DHCP server at the default runlevel.) If that doesn't work, then your services might be starting in the wrong order and you should post your dmesg. – alphacharlie Jul 7 '15 at 23:24
  • @alphacharlie thanks for reply. When I said I have tried update-rc.d I executed this command from terminal once, then I checked content of the /etc/init.d/udhcpd file and it was not empty. I cleaned rc.local and tried to run sudo update-rc.d udhcpd enable default, but issue still presented. Output of update-rc.d and dmesg in update section. – Roman Jul 8 '15 at 0:06
  • OK, next - have you enabled udhcpd in /etc/default/udhcpd ? (and if so is the -S flag enabled?) – alphacharlie Jul 8 '15 at 3:18
  • yes, udhcpd enabled and loading with -S flag. – Roman Jul 8 '15 at 4:00
  • OK. So what's the output of - grep udhcpd /var/log/syslog ? (This looks for anything from udhcpd in the system log, which should be there since the -S flag is active...) – alphacharlie Jul 8 '15 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.