Closed samos123 closed 7 years ago
rc.cloud when run places the pub key in .ssh/authorized_keys but by default dropbear is configured to only read /etc/dropbear/authorized_keys. rc.cloud for openwrt should write to /etc/dropbear/authorized_keys instead. Pull request incoming.
Original issue (Wrong assumption): I created a VM image following your guide at http://hackstack.org/x/blog/2014/08/17/openwrt-images-for-openstack/ but rc.cloud doesn't get started at vm runtime.
I've verified that rc.cloud is installed to /etc/init.d/
ls /etc/init.d/rc.* /etc/init.d/rc.cloud-final /etc/init.d/rc.cloud-functions /etc/init.d/rc.cloud-setup /etc/init.d/rc.cloud-userdata
When running the VM it just shows: http://paste.openstack.org/show/412480/
[H[J[1;1H[?25l[m[H[J[1;1H[2;27HGNU GRUB version 2.02~beta2 [m[4;2H+----------------------------------------------------------------------------+[5;2H|[5;79H|[6;2H|[6;79H|[7;2H|[7;79H|[8;2H|[8;79H|[9;2H|[9;79H|[10;2H|[10;79H|[11;2H|[11;79H|[12;2H|[12;79H|[13;2H|[13;79H|[14;2H|[14;79H|[15;2H|[15;79H|[16;2H+----------------------------------------------------------------------------+[m[17;2H[18;2H[m Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. ESC to return previous menu. [5;80H [7m[5;3H*OpenWrt [m[5;78H[m[m[6;3H OpenWrt (failsafe) [m[6;78H[m[m[7;3H [m[7;78H[m[m[8;3H [m[8;78H[m[m[9;3H [m[9;78H[m[m[10;3H [m[10;78H[m[m[11;3H [m[11;78H[m[m[12;3H [m[12;78H[m[m[13;3H [m[13;78H[m[m[14;3H [m[14;78H[m[m[15;3H [m[15;78H[m[15;80H [5;78H[22;1H The highlighted entry will be executed automatically in 5s. [5;78H[22;1H The highlighted entry will be executed automatically in 4s. [5;78H[22;1H The highlighted entry will be executed automatically in 3s. [5;78H[22;1H The highlighted entry will be executed automatically in 2s. [5;78H[22;1H The highlighted entry will be executed automatically in 1s. [5;78H[22;1H The highlighted entry will be executed automatically in 0s. [5;78H[?25h[H[J[1;1H[H[J[1;1H Booting `OpenWrt' [ 0.000000] Linux version 3.18.19 (samos@samos-ThinkPad-W530) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46569) ) #1 SMP Sun Aug 9 16:04:23 CST 2015 [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffdfff] usable [ 0.000000] BIOS-e820: [mem 0x000000001fffe000-0x000000001fffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] Hypervisor detected: KVM [ 0.000000] e820: last_pfn = 0x1fffe max_arch_pfn = 0x1000000 [ 0.000000] found SMP MP-table at [mem 0x000f0b50-0x000f0b5f] mapped at [c00f0b50] [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] init_memory_mapping: [mem 0x1fc00000-0x1fdfffff] [ 0.000000] init_memory_mapping: [mem 0x1c000000-0x1fbfffff] [ 0.000000] init_memory_mapping: [mem 0x00100000-0x1bffffff] [ 0.000000] init_memory_mapping: [mem 0x1fe00000-0x1fffdfff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F09B0 000014 (v00 BOCHS ) [ 0.000000] ACPI: RSDT 0x000000001FFFFB89 000034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACP 0x000000001FFFF1C0 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001) [ 0.000000] ACPI: DSDT 0x000000001FFFE040 001180 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACS 0x000000001FFFE000 000040 [ 0.000000] ACPI: SSDT 0x000000001FFFF234 0008DD (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: APIC 0x000000001FFFFB11 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001) [ 0.000000] ACPI: RSDT 0x000000001FFFFB89 000034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) [ 0.000000] 511MB LOWMEM available. [ 0.000000] mapped low ram: 0 - 1fffe000 [ 0.000000] low ram: 0 - 1fffe000 [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: cpu 0, msr 0:1fffd001, primary cpu clock [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x00001000-0x00ffffff] [ 0.000000] Normal [mem 0x01000000-0x1fffdfff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00001000-0x0009efff] [ 0.000000] node 0: [mem 0x00100000-0x1fffdfff] [ 0.000000] Initmem setup node 0 [mem 0x00001000-0x1fffdfff] [ 0.000000] Using APIC driver default [ 0.000000] ACPI: PM-Timer IO Port: 0xb008 [ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) [ 0.000000] ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0]) [ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level) [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] e820: [mem 0x20000000-0xfeffbfff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 14 pages/cpu @dfbea000 s27264 r0 d30080 u57344 [ 0.000000] KVM setup async PF for cpu 0 [ 0.000000] kvm-stealtime: cpu 0, msr 1fbec880 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129948 [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz root=/dev/vda2 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Initializing CPU#0 [ 0.000000] Memory: 514520K/523888K available (2980K kernel code, 205K rwdata, 872K rodata, 308K init, 260K bss, 9368K reserved) [ 0.000000] virtual kernel memory layout: [ 0.000000] fixmap : 0xfff66000 - 0xfffff000 ( 612 kB) [ 0.000000] vmalloc : 0xe07fe000 - 0xfff64000 ( 503 MB) [ 0.000000] lowmem : 0xc0000000 - 0xdfffe000 ( 511 MB) [ 0.000000] .init : 0xc13fa000 - 0xc1447000 ( 308 kB) [ 0.000000] .data : 0xc12e9657 - 0xc13f8780 (1084 kB) [ 0.000000] .text : 0xc1000000 - 0xc12e9657 (2981 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS:2304 nr_irqs:256 0 [ 0.000000] Console: colour VGA+ 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] console [ttyS0] enabled [ 0.000000] tsc: Detected 2399.968 MHz processor [ 0.020000] Calibrating delay loop (skipped) preset value.. 4799.93 BogoMIPS (lpj=23999680) [ 0.020000] pid_max: default: 32768 minimum: 301 [ 0.020000] ACPI: Core revision 20140926 [ 0.020000] ACPI: All ACPI Tables successfully acquired [ 0.020000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.020000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.020000] mce: CPU supports 10 MCE banks [ 0.020000] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 0.020000] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 0.031991] Freeing SMP alternatives memory: 16K (c1447000 - c144b000) [ 0.035561] Enabling APIC mode: Flat. Using 1 I/O APICs [ 0.037894] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 0.038940] smpboot: CPU0: Intel Westmere E56xx/L56xx/X56xx (Nehalem-C) (fam: 06, model: 2c, stepping: 01) [ 0.050000] Performance Events: unsupported p6 CPU model 44 no PMU driver, software events only. [ 0.050000] x86: Booted up 1 node, 1 CPUs [ 0.050000] smpboot: Total of 1 processors activated (4799.93 BogoMIPS) [ 0.050000] NET: Registered protocol family 16 [ 0.050000] cpuidle: using governor ladder [ 0.050000] cpuidle: using governor menu [ 0.050000] ACPI: bus type PCI registered [ 0.050000] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 0.050000] PCI : PCI BIOS area is rw and x. Use pci=nobios if you want it NX. [ 0.050008] PCI: PCI BIOS revision 2.10 entry at 0xfd3c2, last bus=0 [ 0.051100] PCI: Using configuration type 1 for base access [ 0.053667] ACPI: Added _OSI(Module Device) [ 0.054482] ACPI: Added _OSI(Processor Device) [ 0.055333] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.056197] ACPI: Added _OSI(Processor Aggregator Device) [ 0.059040] ACPI: Interpreter enabled [ 0.060011] ACPI: (supports S0 S5) [ 0.060711] ACPI: Using IOAPIC for interrupt routing [ 0.061622] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.065665] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.066751] acpi PNP0A03:00: _OSC: OS supports [Segments MSI] [ 0.067779] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.068982] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. [ 0.070094] acpiphp: Slot [3] registered [ 0.070901] acpiphp: Slot [4] registered [ 0.071701] acpiphp: Slot [5] registered [ 0.072493] acpiphp: Slot [6] registered [ 0.073286] acpiphp: Slot [7] registered [ 0.074087] acpiphp: Slot [8] registered [ 0.074915] acpiphp: Slot [9] registered [ 0.075719] acpiphp: Slot [10] registered [ 0.076528] acpiphp: Slot [11] registered [ 0.077345] acpiphp: Slot [12] registered [ 0.078168] acpiphp: Slot [13] registered [ 0.080032] acpiphp: Slot [14] registered [ 0.080837] acpiphp: Slot [15] registered [ 0.081650] acpiphp: Slot [16] registered [ 0.082487] acpiphp: Slot [17] registered [ 0.083311] acpiphp: Slot [18] registered [ 0.084117] acpiphp: Slot [19] registered [ 0.084925] acpiphp: Slot [20] registered [ 0.085731] acpiphp: Slot [21] registered [ 0.086545] acpiphp: Slot [22] registered [ 0.087362] acpiphp: Slot [23] registered [ 0.088169] acpiphp: Slot [24] registered [ 0.089007] acpiphp: Slot [25] registered [ 0.090032] acpiphp: Slot [26] registered [ 0.090837] acpiphp: Slot [27] registered [ 0.091658] acpiphp: Slot [28] registered [ 0.092471] acpiphp: Slot [29] registered [ 0.093283] acpiphp: Slot [30] registered [ 0.094097] acpiphp: Slot [31] registered [ 0.094898] PCI host bridge to bus 0000:00 [ 0.095698] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.096668] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7] [ 0.097728] pci_bus 0000:00: root bus resource [io 0x0d00-0xadff] [ 0.098784] pci_bus 0000:00: root bus resource [io 0xae0f-0xaeff] [ 0.100005] pci_bus 0000:00: root bus resource [io 0xaf20-0xafdf] [ 0.101075] pci_bus 0000:00: root bus resource [io 0xafe4-0xffff] [ 0.102132] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff] [ 0.103272] pci_bus 0000:00: root bus resource [mem 0x20000000-0xfebfffff] [ 0.110763] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.111961] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.113048] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.114215] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.121199] pci 0000:00:01.3: can't claim BAR 7 [io 0xb000-0xb03f]: address conflict with ACPI PM1a_EVT_BLK [io 0xb000-0xb003] [ 0.123153] pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB [ 0.164366] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) [ 0.165818] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) [ 0.167216] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) [ 0.168634] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) [ 0.170053] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) [ 0.171464] ACPI: Enabled 16 GPEs in block 00 to 0F [ 0.172759] SCSI subsystem initialized [ 0.173816] PCI: Using ACPI for IRQ routing [ 0.175069] Switched to clocksource kvm-clock [ 0.176029] pnp: PnP ACPI init [ 0.177302] pnp: PnP ACPI: found 6 devices [ 0.208703] pci 0000:00:01.3: BAR 7: [io 0xb000-0xb03f] has bogus alignment [ 0.209944] NET: Registered protocol family 2 [ 0.211037] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.212229] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 0.215522] TCP: Hash tables configured (established 4096 bind 4096) [ 0.216636] TCP: reno registered [ 0.217311] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.218366] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.219514] NET: Registered protocol family 1 [ 0.220386] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.221417] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.222462] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.223805] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11 [ 0.231575] NatSemi SCx200 Driver [ 0.232394] futex hash table entries: 256 (order: 3, 32768 bytes) [ 0.235553] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.236594] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.238490] msgmni has been set to 1004 [ 0.241206] io scheduler noop registered [ 0.241991] io scheduler deadline registered (default) [ 0.243001] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.244017] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.245193] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 [ 0.246629] ACPI: Power Button [PWRF] [ 0.247757] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10 [ 0.250831] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10 [ 0.252580] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled [ 0.281123] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 0.313187] 00:05: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 0.314718] Non-volatile memory driver v1.3 [ 0.317499] vda: vda1 vda2 [ 0.319431] scsi host0: ata_piix [ 0.320214] scsi host1: ata_piix [ 0.320931] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0a0 irq 14 [ 0.322057] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0a8 irq 15 [ 0.323339] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [ 0.325447] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.326354] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.327331] rtc_cmos 00:00: RTC can wake from S4 [ 0.328387] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 [ 0.329663] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram [ 0.330855] TCP: cubic registered [ 0.331557] NET: Registered protocol family 17 [ 0.332431] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [ 0.334537] 8021q: 802.1Q VLAN Support v1.8 [ 0.335468] Using IPI Shortcut mode [ 0.336754] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 0.339216] rtc_cmos 00:00: setting system clock to 2015-08-11 07:31:13 UTC (1439278273) [ 0.506442] EXT4-fs (vda2): mounted filesystem without journal. Opts: (null) [ 0.507675] VFS: Mounted root (ext4 filesystem) readonly on device 254:2. [ 0.508958] Freeing unused kernel memory: 308K (c13fa000 - c1447000) [ 0.575467] init: Console is alive [ 0.698321] Button Hotplug driver version 0.4.1 [ 1.220205] tsc: Refined TSC clocksource calibration: 2399.991 MHz [ 1.576567] init: - preinit - Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 3.639467] mount_root: mounting /dev/root [ 3.650388] EXT4-fs (vda2): re-mounted. Opts: (null) [ 3.651379] mount_root: loading kmods from internal overlay [ 3.673897] block: attempting to load /etc/config/fstab [ 3.676892] block: unable to load configuration (fstab: Entry not found) [ 3.678078] block: no usable configuration [ 3.696873] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null) mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory [ 3.701004] procd: - early - [ 4.214010] procd: - ubus - [ 5.220146] random: ubusd urandom read with 4 bits of entropy available [ 5.230171] procd: - init - Please press Enter to activate this console. [ 5.311417] NET: Registered protocol family 10 [ 5.314767] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 5.370514] ip_tables: (C) 2000-2006 Netfilter Core Team [ 5.372144] nf_conntrack version 0.5.0 (8044 buckets, 32176 max) [ 5.375626] xt_time: kernel timezone is -0000 [ 5.377250] PPP generic driver version 2.4.2 [ 5.378192] NET: Registered protocol family 24 [ 6.824958] 8021q: adding VLAN 0 to HW filter on device eth0 [ 6.826666] device eth0 entered promiscuous mode [ 6.830181] br-lan: port 1(eth0) entered forwarding state [ 6.831509] br-lan: port 1(eth0) entered forwarding state [ 8.830029] br-lan: port 1(eth0) entered forwarding state [ 153.713918] random: nonblocking pool is initialized
rc.cloud when run places the pub key in .ssh/authorized_keys but by default dropbear is configured to only read /etc/dropbear/authorized_keys. rc.cloud for openwrt should write to /etc/dropbear/authorized_keys instead. Pull request incoming.
Original issue (Wrong assumption): I created a VM image following your guide at http://hackstack.org/x/blog/2014/08/17/openwrt-images-for-openstack/ but rc.cloud doesn't get started at vm runtime.
I've verified that rc.cloud is installed to /etc/init.d/
When running the VM it just shows: http://paste.openstack.org/show/412480/