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

[WIP] Add structure to enable baking Moby Linux AMI #116

Merged
merged 2 commits into from
May 7, 2016
Merged

[WIP] Add structure to enable baking Moby Linux AMI #116

merged 2 commits into from
May 7, 2016

Conversation

nathanleclaire
Copy link
Contributor

This does not actually render a bootable instance, but introduces some boilerplate that hopefully should help to get us there sooner rather than later.

It's a bit messy so we probably shouldn't merge right away, and some parts aren't really used (e.g. the GRUB Dockerfile), but are around since they might be useful. If it behooves us we can keep them and if not I'm happy to take them out.

To build an AMI from scratch using the Moby Linux BIOS ISO, the idea is that you simply have to:

$ make ami

in the alpine/ directory, and the process of making a volume + formatting and writing it (including GRUB conf) + snapshotting + creating an AMI from the snapshot is then done for you automatically. Currently, it works "in place", so existing build resources will all be removed before attempting a new build from scratch.

(This assumes that you have run aws configure on the host OS. I'm not really sure what the best approach is here so for a quick fix I just mount in ~/.aws read-only to the build container).

The operations being performed on $EBS_DEVICE are obviously wrong and need to be fixed, presently they are mostly copied from the Alpine Linux on AWS guide, just using the Moby BIOS ISO instead of theirs -- we could probably convert this to just boot Alpine if feeling pressure to deliver something ASAP, but I really want to boot Moby specifically.

There are a few rough edges so let me know if you run into anything and/or how to fix.

This is mostly the AWS boilerplate and the process of actually writing the proper things to the EBS volume device is still a little hazy to me (but I'm learning!). I really welcome any guidance people have here. If no one has any ideas, Monday I'll take a whack at making a small GRUB partition and booting directly into Moby like Justin mentioned in the other thread.

Once we get this OS booting, next steps will probably be to polish up init to work well in cloud.

FYI and please take a look @justincormack @mavenugo @kencochrane @rneugeba @ijc25

Signed-off-by: Nathan LeClaire nathan.leclaire@gmail.com

@rn
Copy link
Member

rn commented Apr 30, 2016

I think you don't need to mount the ISO, it only contains the kernel/initrd and uses syslinux as the boot loader (syslinux is kinda like grub for cdroms). Your build should depend on initrd.img and then just copy initrd.img and kernel/vmlinuz64 into the container.

I also think it would be good to split the build process into two steps. One which creates a bootable raw disk (which can be tested with qemu etc) and a second step which then turns this into a AMI.

@nathanleclaire
Copy link
Contributor Author

nathanleclaire commented May 5, 2016

Still a bit baffled on why this isn't booting correctly. I'm most suspicious of the (extlinux) configuration not being set exactly correctly somehow, since I managed to get an instance to actually boot and stay running without a extlinux.cfg configuration file on the partition (but am having trouble reproducing this build sadly, although I do have a snap-shotted volume and AMI that is still around for that).

@justincormack Maybe there's still another kernel config option we're overlooking for the console? Even the instances that can boot "properly" don't output anything to the system log.

hvc0 definitely seems to be the proper device to output to the AWS "System Logs" console from what I've seen in GRUB etc. configs elsewhere.

Next steps are to break the build into two steps as @rneugeba mentioned, so that I can iterate faster and hopefully get more information using qemu. I think I should be able to do all of the device formatting and partitioning on a loopback and then boot from the resulting disk image.

@nathanleclaire
Copy link
Contributor Author

I also added a (admittedly hacky) script, run-instance.sh, which will launch an instance after an AMI build has completed from the CLI directly. Previously I was using the AWS browser and it was pretty slow :)

@nathanleclaire
Copy link
Contributor Author

Might remove the grub stuff as well since I'm using syslinux / extlinux now, I couldn't even find a grub package in the Docker official alpine image using apk.

@nathanleclaire
Copy link
Contributor Author

Maybe extlinux --install ${ROOT_PARTITION_MOUNT} doesn't do exactly what is intended for some reason.

@nathanleclaire
Copy link
Contributor Author

As for why it won't boot, maybe there needs to be /etc/fstab entry and/or run e2label command as well?

@nathanleclaire
Copy link
Contributor Author

As for why it won't boot, maybe there needs to be /etc/fstab entry and/or run e2label command as well?

Yeah on second thought this probably isn't it, I don't know if we even need an /etc/fstab in the original partition.

@@ -26,7 +26,10 @@ mknod -m 666 zero c 1 5
mknod -m 666 tty c 5 0
mknod -m 600 console c 5 1

mknod -m 600 tty0 c 4 11
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check these changes out @justincormack. Do they seem right to you? @ncopa and I were discussing and he mentioned that we should either create these devices here in order to have them in place when we boot, or we need to use devtmpfs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using devtmpfs now as of a few weeks ago, I just left some devices
in case someone does not.
On 6 May 2016 02:51, "Nathan LeClaire" notifications@github.com wrote:

In alpine/mkinitrd.sh
docker/engine#116 (comment):

@@ -26,7 +26,10 @@ mknod -m 666 zero c 1 5
mknod -m 666 tty c 5 0
mknod -m 600 console c 5 1

+mknod -m 600 tty0 c 4 11

Check these changes out @justincormack https://github.com/justincormack.
Do they seem right to you? @ncopa https://github.com/ncopa and I were
discussing and he mentioned that we should either create these devices here
in order to have them in place when we boot, or we need to use devtmpfs


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/docker/moby/pull/116/files/92164619a12fd912c3a0553b679028f5c8fa45ac#r62280786

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, so probably I should take these changes out?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, doesnt really matter, maybe should remove all of them but they are pretty harmless.

@nathanleclaire
Copy link
Contributor Author

nathanleclaire commented May 6, 2016

OK I pulled the GRUB stuff out and everything has the latest changes. It's still not booting properly or showing anything to the console so I wonder which piece of the puzzle is still missing. Conflicting information about whether console= should be set to hvc0, tty0, ttyS0 etc. is all over the place, so I'm not sure what to think there. On this HVM c4.4xlarge that I use to do the compiles it seems set to hvc0.

@ijc
Copy link
Contributor

ijc commented May 6, 2016

@nathanleclaire you can have multiple console= and it'll output to all of the ones which actually exist, not sure about input, think it might just be the last one. So I'd list all possible options on the command line. I'd also make sure /etc/inittab is starting a getty (or agetty/mgetty etc depending on what alpine likes) on all of them, which will have the benefit of naming the one which is in actual use...

Are you running in an HVM instance now?

@justincormack
Copy link
Member

Its currently only starting a getty on the serial console, but if you get boot output we can fix that easily (will try to fix that anyway)

@ijc
Copy link
Contributor

ijc commented May 6, 2016

Running a getty on all three (in a dev/debug purposes) means you will get something like
Kernel 4.4.6-moby on an x86_64 (/dev/ttyS0)
and therefore know which one of the potentially consoles is actually working...

@justincormack
Copy link
Member

added the xen blockdev in master

@nathanleclaire
Copy link
Contributor Author

@ijc25 Yes, it's HVM.

Nice, thanks @justincormack. Will rebase and try that out. Adding all the "console=" options and that option manually I still didn't have any success booting though. I think I might take a crack at a booting a Hdt (http://www.syslinux.org/wiki/index.php?title=Hdt_(Hardware_Detection_Tool)) to see if our assumptions about console devices are correct, or if I can get anything to display on the logs at all.

@nathanleclaire
Copy link
Contributor Author

Calling $(MAKE) -C kernel in the ami target should be sufficient to re-compile the kernel right?

@nathanleclaire
Copy link
Contributor Author

Re-trying now with latest master changes (and adding all console= which seem likely).

@nathanleclaire
Copy link
Contributor Author

screen shot 2016-05-06 at 2 14 00 pm

Yes!

@nathanleclaire
Copy link
Contributor Author

screen shot 2016-05-06 at 2 22 05 pm

@justincormack
Copy link
Member

Yay!

Odd there is no network, should be easy to fix. What does ifconfig -a say (assuming you can log in on console).

So it was /dev/ttyS0 anyway?? Why didnt it work before?

@nathanleclaire
Copy link
Contributor Author

I'm not 100% positive, but it seems the needed change was to set EBS_DEVICE to /dev/xvdb (/dev/xvda would also probably work, but that's the root device in my compiler instance already) instead of /dev/xvdf. I'm quite confused as to why. It seems to be AWS magic device naming rules I guess?

This table might have something to do with it ? (From http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html)

@nathanleclaire
Copy link
Contributor Author

I think the AWS "System Logs" console is read only, sadly. Maybe I can dump ifconfig -a from some init scripts.

@justincormack
Copy link
Member

Yes, just dump it from any of them... doesnt really matter which.

@nathanleclaire
Copy link
Contributor Author

Right on

@justincormack
Copy link
Member

Its not finding the drive either, which is also a bit odd, maybe dump /dev too.

@nathanleclaire
Copy link
Contributor Author

I'll post the whole dump for you to take a look at too

@nathanleclaire
Copy link
Contributor Author

Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.6-moby (root@1326d3a9ee88) (gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) ) #1 SMP Fri May 6 17:29:12 UTC 2016
Command line: BOOT_IMAGE=/vmlinuz64 root=/dev/xvdf1 console=hvc0 console=tty0 console=tty1 console=ttyS0 initrd=/initrd.img
x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers'
x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
x86/fpu: Using 'eager' FPU context switches.
e820: BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
BIOS-e820: [mem 0x00000000fc000000-0x00000000ffffffff] reserved
NX (Execute Disable) protection: active
SMBIOS 2.4 present.
Hypervisor detected: Xen
Xen version 4.2.
Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
You might have to change the root device
from /dev/hd[a-d] to /dev/xvd[a-d]
in your root= kernel command line option
e820: last_pfn = 0x20000 max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
found SMP MP-table at [mem 0x000fbba0-0x000fbbaf] mapped at [ffff8800000fbba0]
RAMDISK: [mem 0x17acb000-0x1fffffff]
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000000EA020 000024 (v02 Xen   )
ACPI: XSDT 0x00000000FC00F5A0 000054 (v01 Xen    HVM      00000000 HVML 00000000)
ACPI: FACP 0x00000000FC00F260 0000F4 (v04 Xen    HVM      00000000 HVML 00000000)
ACPI: DSDT 0x00000000FC0035E0 00BBF6 (v02 Xen    HVM      00000000 INTL 20090123)
ACPI: FACS 0x00000000FC0035A0 000040
ACPI: FACS 0x00000000FC0035A0 000040
ACPI: APIC 0x00000000FC00F360 0000D8 (v02 Xen    HVM      00000000 HVML 00000000)
ACPI: HPET 0x00000000FC00F4B0 000038 (v01 Xen    HVM      00000000 HVML 00000000)
ACPI: WAET 0x00000000FC00F4F0 000028 (v01 Xen    HVM      00000000 HVML 00000000)
ACPI: SSDT 0x00000000FC00F520 000031 (v02 Xen    HVM      00000000 INTL 20090123)
ACPI: SSDT 0x00000000FC00F560 000031 (v02 Xen    HVM      00000000 INTL 20090123)
Zone ranges:
  DMA      [mem 0x0000000000001000-0x0000000000ffffff]
  DMA32    [mem 0x0000000001000000-0x000000001fffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000001000-0x000000000009dfff]
  node   0: [mem 0x0000000000100000-0x000000001fffffff]
Initmem setup node 0 [mem 0x0000000000001000-0x000000001fffffff]
ACPI: PM-Timer IO Port: 0xb008
IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-47
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 low level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 low level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 low level)
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a201 base: 0xfed00000
smpboot: 15 Processors exceeds NR_CPUS limit of 8
smpboot: Allowing 8 CPUs, 7 hotplug CPUs
e820: [mem 0x20000000-0xfbffffff] available for PCI devices
Booting paravirtualized kernel on Xen HVM
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
PERCPU: Embedded 33 pages/cpu @ffff880017800000 s95064 r8192 d31912 u262144
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 128904
Kernel command line: BOOT_IMAGE=/vmlinuz64 root=/dev/xvdf1 console=hvc0 console=tty0 console=tty1 console=ttyS0 initrd=/initrd.img
PID hash table entries: 2048 (order: 2, 16384 bytes)
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Memory: 365620K/523892K available (6221K kernel code, 1177K rwdata, 2472K rodata, 940K init, 652K bss, 158272K reserved, 0K cma-reserved)
Hierarchical RCU implementation.
    Build-time adjustment of leaf fanout to 64.
NR_IRQS:4352 nr_irqs:896 16
xen:events: Using 2-level ABI
xen:events: Xen HVM callback vector for event delivery is enabled
Console: colour VGA+ 80x25
console [tty0] enabled
Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
console [ttyS0] enabled
clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 30580167144 ns
tsc: Detected 2400.034 MHz processor
Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.06 BogoMIPS (lpj=24000340)
pid_max: default: 32768 minimum: 301
ACPI: Core revision 20150930
ACPI: 3 ACPI AML tables successfully acquired and loaded
Security Framework initialized
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
Initializing cgroup subsys io
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys perf_event
Initializing cgroup subsys net_prio
Initializing cgroup subsys hugetlb
Initializing cgroup subsys pids
CPU: Physical Processor ID: 0
Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
clocksource: xen: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
installing Xen timer for CPU 0
smpboot: CPU0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz (family: 0x6, model: 0x3f, stepping: 0x2)
Performance Events: unsupported p6 CPU model 63 no PMU driver, software events only.
x86: Booted up 1 node, 1 CPUs
smpboot: Total of 1 processors activated (4800.06 BogoMIPS)
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
cpuidle: using governor ladder
cpuidle: using governor menu
ACPI: bus type PCI registered
PCI: Using configuration type 1 for base access
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfbffffff window]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
* Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
* this clock source is slow. Consider trying other clock sources
pci 0000:00:01.3: quirk: [io  0xb000-0xb03f] claimed by PIIX4 ACPI
ACPI: PCI Interrupt Link [LNKA] (IRQs *5 10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs *5 10 11)
ACPI: Enabled 2 GPEs in block 00 to 0F
xen:balloon: Initialising balloon driver
vgaarb: setting as boot device: PCI:0000:00:02.0
vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
vgaarb: bridge control possible 0000:00:02.0
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
wmi: Mapper loaded
PCI: Using ACPI for IRQ routing
HPET: 3 timers in total, 0 timers will be used for per-cpu timer
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 comparators, 64-bit 62.500000 MHz counter
clocksource: Switched to clocksource xen
FS-Cache: Loaded
CacheFiles: Loaded
pnp: PnP ACPI init
system 00:00: [mem 0x00000000-0x0009ffff] could not be reserved
system 00:01: [io  0x08a0-0x08a3] has been reserved
system 00:01: [io  0x0cc0-0x0ccf] has been reserved
system 00:01: [io  0x04d0-0x04d1] has been reserved
system 00:07: [io  0x10c0-0x1141] has been reserved
system 00:07: [io  0xb044-0xb047] has been reserved
pnp: PnP ACPI: found 8 devices
clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:01.0: Activating ISA DMA hang workarounds
Unpacking initramfs...
Freeing initrd memory: 136404K (ffff880017acb000 - ffff880020000000)
RAPL PMU detected, API unit is 2^-32 Joules, 3 fixed counters 655360 ms ovfl timer
hw unit of domain pp0-core 2^-14 Joules
hw unit of domain package 2^-14 Joules
hw unit of domain dram 2^-16 Joules
futex hash table entries: 2048 (order: 5, 131072 bytes)
HugeTLB registered 2 MB page size, pre-allocated 0 pages
FS-Cache: Netfs 'nfs' registered for caching
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
FS-Cache: Netfs 'cifs' registered for caching
fuse init (API version 7.23)
9p: Installing v9fs 9p2000 file system support
FS-Cache: Netfs '9p' registered for caching
aufs 4.4-20160328
Key type big_key registered
NET: Registered protocol family 38
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Console: switching to colour frame buffer device 100x37
hv_vmbus: registering driver hyperv_fb
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
ACPI: Sleep Button [SLPF]
GHES: HEST is not enabled!
xen:grant_table: Grant tables using version 1 layout
Grant table initialized
Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
Initializing Nozomi driver 2.1d
Non-volatile memory driver v1.3
Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
[drm] Initialized drm 1.1.0 20060810
loop: module loaded
hv_vmbus: registering driver hv_storvsc
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP generic driver version 2.4.2
hv_vmbus: registering driver hv_netvsc
hv_vmbus: registering driver hyperv_keyboard
mousedev: PS/2 mouse device common for all mice
input: PC Speaker as /devices/platform/pcspkr/input/input2
rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
rtc_cmos 00:02: alarms up to one day, 114 bytes nvram, hpet irqs
i2c /dev entries driver
hv_utils: Registering HyperV Utility Driver
hv_vmbus: registering driver hv_util
hv_vmbus: registering driver hv_balloon
oprofile: using timer interrupt.
GACT probability on
Mirror/redirect action on
Simple TC action Loaded
netem: version 1.3
u32 classifier
    Performance counters on
    input device check on
    Actions configured
Netfilter messages via NETLINK v0.30.
nfnl_acct: registering with nfnetlink.
nf_conntrack version 0.5.0 (3922 buckets, 15688 max)
ctnetlink v0.93: registering with nfnetlink.
nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>
nf_tables_compat: (c) 2012 Pablo Neira Ayuso <pablo@netfilter.org>
xt_time: kernel timezone is -0000
ip_set: protocol 6
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
IPVS: Creating netns size=1328 id=0
IPVS: ipvs loaded.
gre: GRE over IPv4 demultiplexor driver
ip_tables: (C) 2000-2006 Netfilter Core Team
ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
arp_tables: (C) 2002 David S. Miller
Initializing XFRM netlink socket
blkfront: xvdb: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled;
NET: Registered protocol family 10
mip6: Mobile IPv6
ip6_tables: (C) 2000-2006 Netfilter Core Team
sit: IPv6 over IPv4 tunneling driver
ip6_gre: GRE over IPv6 tunneling driver
 xvdb: xvdb1
NET: Registered protocol family 17
NET: Registered protocol family 15
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
Ebtables v2.0 registered
l2tp_core: L2TP core driver, V2.0
8021q: 802.1Q VLAN Support v1.8
9pnet: Installing 9P2000 support
Key type dns_resolver registered
openvswitch: Open vSwitch switching datapath
hv_sock: failed to load: VMBus 4 or later is required
mpls_gso: MPLS GSO support
microcode: CPU0 sig=0x306f2, pf=0x1, revision=0x2b
microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
AVX2 version of gcm_enc/dec engaged.
AES CTR mode by8 optimization enabled
registered taskstats version 1
Key type encrypted registered
tsc: Refined TSC clocksource calibration: 2399.997 MHz
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x229834d6ac9, max_idle_ns: 440795285103 ns
xenbus_probe_frontend: Waiting for devices to initialise: 25s...20s...15s...10s...5s...0s...

xenbus_probe_frontend: Timeout connecting to device: device/vfb/0 (local state 3, remote state 1)
xenbus_probe_frontend: Device with no driver: device/vif/0
rtc_cmos 00:02: setting system clock to 2016-05-06 20:49:42 UTC (1462567782)
Freeing unused kernel memory: 940K (ffffffff819a8000 - ffffffff81a93000)

   OpenRC 0.19.368c2a1 is starting up Linux 4.4.6-moby (x86_64)

 * Mounting /proc ... [ ok ]
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Configuring binfmt misc ... [ ok ]
 * Mounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/mqueue ... [ ok ]
 * Mounting /dev/pts ... [ ok ]
 * Mounting /dev/shm ... [ ok ]
 * Mounting /sys ... [ ok ]
 * Mounting security filesystem ... [ ok ]
 * Mounting debug filesystem ... [ ok ]
 * Mounting fuse control filesystem ... [ ok ]
 * Mounting cgroup filesystem ... [ ok ]
 * Starting busybox mdev ...modprobe: FATAL: Module fbcon not found in directory /lib/modules/4.4.6-moby
 [ ok ]
 * Loading hardware drivers ... [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Setting hostname ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Starting busybox klogd ... [ ok ]
 * Configuring host block device ...ls: /dev/[sxv]da: No such file or directory
 * ERROR: automount failed to start
 * Activating swap devices ... [ ok ]
 * Configuring host settings from database ...Could not find database configuration information
 [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Migrating /var/run to /run ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ...ip: ioctl 0x8913 failed: No such device
 [ !! ]
 *   eth1 ...ip: ioctl 0x8913 failed: No such device
 [ !! ]
 * Testing DNS resolution ...ifconfig: eth0: error fetching interface information: Device not found
 * DNS fix failed
 [ !! ]
 * ERROR: dnsfix failed to start
 * Starting busybox syslog ... [ ok ]
 * Starting busybox acpid ... [ ok ]
 * Starting FUSE socket passthrough ... [ ok ]
 * Setting up proxy port mount ...mount: mount(2) failed: No such file or directory
 * Failed to mount proxy port filesystem
 [ !! ]
 * ERROR: proxy failed to start
 * Starting docker socket vsock passthrough ... [ ok ]
 * Starting Docker ...Could not find database configuration information
Could not find database configuration information
Could not find database configuration information
 [ ok ]
 * Starting chronyd ... [ ok ]
 * Starting busybox cron ... [ ok ]
 * Starting docker config update manager ...Could not find database configuration information
 * ERROR: hupper failed to start
 * Checking system state ...
✗ No drive found
2016/05/06 20:49:48 Failed to bind to vsock port 62374: 0x61
✗ No drive mounted
✗ No network connection
✗ No transfused process
✗ No hupper process
✓ Process docker running: /usr/bin/docker daemon --pidfile=/run/docker.pid -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
✓ Process containerd running: docker-containerd -l /var/run/docker/libcontainerd/docker-containerd.sock --runtime docker-runc
✓ Docker daemon working
✓ Diagnostics server running: /usr/bin/diagnostics-server
 * Adjusting oom killer settings ... [ ok ]


Welcome to Moby alpha

Kernel 4.4.6-moby on an x86_64 (/dev/ttyS0)



                        ##         .

                  ## ## ##        ==

               ## ## ## ## ##    ===

           /"""""""""""""""""___/ ===

      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~

           \______ o           __/

             \    \         __/

              \____\_______/



moby login:  * Saving random seed ... [ ok ]
 * Stopping busybox cron ... [ ok ]
 * Stopping busybox syslog ... [ ok ]
 * Stopping chronyd ... [ ok ]
 * Stopping docker
 * Unmounting loop devices
 * Unmounting filesystems
reboot: Power down

@justincormack
Copy link
Member

I just pushed a change that should fix the disk detection (untested, hope it works, no internet at new house yet!)

@nathanleclaire
Copy link
Contributor Author

<3

@justincormack
Copy link
Member

Odd, no sign of ethernet, any way you can boot up another VM and see what the ethernet driver is?

@nathanleclaire
Copy link
Contributor Author

Sure -- I also noticed that I set root=xvdf1 instead of root=xvdb1 in the syslinux.cfg, kind of surprised it still booted actually.

@nathanleclaire
Copy link
Contributor Author

Will push out that change shortly.

@justincormack
Copy link
Member

It looks like I didnt enable most of the ethernet drivers, other than virtual ones. Odd though as the Xen PV device is enabled. Maybe it has a pci passthrough dev, though I dont remember seeing one on the last machine I booted...

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
@nathanleclaire
Copy link
Contributor Author

nathanleclaire commented May 6, 2016

Looks like if I try to use root=xvdb1 instead of root=xvdf1 it doesn't work. I wonder what's up with that.

EDIT: Something else might be to blame.
EDIT2: Maybe I'm just impatient, seems the system logs are showing eventually in both cases :)

@nathanleclaire
Copy link
Contributor Author

The output you asked about...

 * Here is the output for ifconfig -a ...
bond0     Link encap:Ethernet  HWaddr BA:04:CA:64:ED:83
          BROADCAST MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

dummy0    Link encap:Ethernet  HWaddr FE:F8:3D:5B:B8:DF
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ip6gre0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1448  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1452  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%32684/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

teql0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

/dev:

total 0
drwxr-xr-x   11 root     root        2.5K May  6 23:36 .
drwxrwxrwt   18 root     root         400 May  6 23:36 ..
crw-rw----    1 root     root       10,  62 May  6 23:35 cachefiles
crw-------    1 root     tty         5,   1 May  6 23:35 console
lrwxrwxrwx    1 root     root          11 May  6 23:36 core -> /proc/kcore
drwxr-xr-x    3 root     root          80 May  6 23:35 cpu
crw-rw----    1 root     root       10,  60 May  6 23:35 cpu_dma_latency
crw-rw----    1 root     root       10, 203 May  6 23:35 cuse
crw-rw----    1 root     video      29,   0 May  6 23:35 fb0
lrwxrwxrwx    1 root     root          13 May  6 23:36 fd -> /proc/self/fd
crw-rw-rw-    1 root     root        1,   7 May  6 23:35 full
crw-rw-rw-    1 root     root       10, 229 May  6 23:35 fuse
crw-rw----    1 root     root       10, 228 May  6 23:35 hpet
crw-rw----    1 root     root       10, 183 May  6 23:35 hwrng
drwxr-xr-x    2 root     root         120 May  6 23:35 input
crw-rw----    1 root     root        1,  11 May  6 23:35 kmsg
srw-rw-rw-    1 root     root           0 May  6 23:36 log
drwxr-xr-x    2 root     root         200 May  6 23:36 loop
crw-rw----    1 root     root       10, 237 May  6 23:35 loop-control
brw-------    1 root     root        7,   0 May  6 23:35 loop0
brw-------    1 root     root        7,   1 May  6 23:35 loop1
brw-------    1 root     root        7,   2 May  6 23:35 loop2
brw-------    1 root     root        7,   3 May  6 23:35 loop3
brw-------    1 root     root        7,   4 May  6 23:35 loop4
brw-------    1 root     root        7,   5 May  6 23:35 loop5
brw-------    1 root     root        7,   6 May  6 23:35 loop6
brw-------    1 root     root        7,   7 May  6 23:35 loop7
crw-r-----    1 root     root        1,   1 May  6 23:35 mem
crw-rw----    1 root     root       10,  57 May  6 23:35 memory_bandwidth
drwxr-xr-x    2 root     root          60 May  6 23:36 misc
drwxrwxrwt    2 root     root          40 May  6 23:35 mqueue
drwxr-xr-x    2 root     root          60 May  6 23:35 net
crw-rw----    1 root     root       10,  59 May  6 23:35 network_latency
crw-rw----    1 root     root       10,  58 May  6 23:35 network_throughput
crw-rw-rw-    1 root     root        1,   3 May  6 23:35 null
crw-rw----    1 root     root       10, 144 May  6 23:35 nvram
crw-r-----    1 root     root        1,   4 May  6 23:35 port
crw-rw----    1 root     root      108,   0 May  6 23:35 ppp
crw-------    1 root     root       10,   1 May  6 23:35 psaux
crw-rw-rw-    1 root     tty         5,   2 May  6 23:35 ptmx
drwxr-xr-x    2 root     root           0 May  6 23:35 pts
crw-rw-rw-    1 root     root        1,   8 May  6 23:35 random
crw-rw----    1 root     root      254,   0 May  6 23:35 rtc0
drwxrwxrwt    2 root     root          40 May  6 23:36 shm
lrwxrwxrwx    1 root     root          15 May  6 23:36 stderr -> /proc/self/fd/2
lrwxrwxrwx    1 root     root          15 May  6 23:36 stdin -> /proc/self/fd/0
lrwxrwxrwx    1 root     root          15 May  6 23:36 stdout -> /proc/self/fd/1
crw-rw-rw-    1 root     tty         5,   0 May  6 23:35 tty
crw-------    1 root     root        4,   0 May  6 23:35 tty0
crw-------    1 root     root        4,   1 May  6 23:35 tty1
crw-rw----    1 root     tty         4,  10 May  6 23:35 tty10
crw-rw----    1 root     tty         4,  11 May  6 23:35 tty11
crw-rw----    1 root     tty         4,  12 May  6 23:35 tty12
crw-rw----    1 root     tty         4,  13 May  6 23:35 tty13
crw-rw----    1 root     tty         4,  14 May  6 23:35 tty14
crw-rw----    1 root     tty         4,  15 May  6 23:35 tty15
crw-rw----    1 root     tty         4,  16 May  6 23:35 tty16
crw-rw----    1 root     tty         4,  17 May  6 23:35 tty17
crw-rw----    1 root     tty         4,  18 May  6 23:35 tty18
crw-rw----    1 root     tty         4,  19 May  6 23:35 tty19
crw-------    1 root     root        4,   2 May  6 23:35 tty2
crw-rw----    1 root     tty         4,  20 May  6 23:35 tty20
crw-rw----    1 root     tty         4,  21 May  6 23:35 tty21
crw-rw----    1 root     tty         4,  22 May  6 23:35 tty22
crw-rw----    1 root     tty         4,  23 May  6 23:35 tty23
crw-rw----    1 root     tty         4,  24 May  6 23:35 tty24
crw-rw----    1 root     tty         4,  25 May  6 23:35 tty25
crw-rw----    1 root     tty         4,  26 May  6 23:35 tty26
crw-rw----    1 root     tty         4,  27 May  6 23:35 tty27
crw-rw----    1 root     tty         4,  28 May  6 23:35 tty28
crw-rw----    1 root     tty         4,  29 May  6 23:35 tty29
crw-------    1 root     root        4,   3 May  6 23:35 tty3
crw-rw----    1 root     tty         4,  30 May  6 23:35 tty30
crw-rw----    1 root     tty         4,  31 May  6 23:35 tty31
crw-rw----    1 root     tty         4,  32 May  6 23:35 tty32
crw-rw----    1 root     tty         4,  33 May  6 23:35 tty33
crw-rw----    1 root     tty         4,  34 May  6 23:35 tty34
crw-rw----    1 root     tty         4,  35 May  6 23:35 tty35
crw-rw----    1 root     tty         4,  36 May  6 23:35 tty36
crw-rw----    1 root     tty         4,  37 May  6 23:35 tty37
crw-rw----    1 root     tty         4,  38 May  6 23:35 tty38
crw-rw----    1 root     tty         4,  39 May  6 23:35 tty39
crw-------    1 root     root        4,   4 May  6 23:35 tty4
crw-rw----    1 root     tty         4,  40 May  6 23:35 tty40
crw-rw----    1 root     tty         4,  41 May  6 23:35 tty41
crw-rw----    1 root     tty         4,  42 May  6 23:35 tty42
crw-rw----    1 root     tty         4,  43 May  6 23:35 tty43
crw-rw----    1 root     tty         4,  44 May  6 23:35 tty44
crw-rw----    1 root     tty         4,  45 May  6 23:35 tty45
crw-rw----    1 root     tty         4,  46 May  6 23:35 tty46
crw-rw----    1 root     tty         4,  47 May  6 23:35 tty47
crw-rw----    1 root     tty         4,  48 May  6 23:35 tty48
crw-rw----    1 root     tty         4,  49 May  6 23:35 tty49
crw-------    1 root     root        4,   5 May  6 23:35 tty5
crw-rw----    1 root     tty         4,  50 May  6 23:35 tty50
crw-rw----    1 root     tty         4,  51 May  6 23:35 tty51
crw-rw----    1 root     tty         4,  52 May  6 23:35 tty52
crw-rw----    1 root     tty         4,  53 May  6 23:35 tty53
crw-rw----    1 root     tty         4,  54 May  6 23:35 tty54
crw-rw----    1 root     tty         4,  55 May  6 23:35 tty55
crw-rw----    1 root     tty         4,  56 May  6 23:35 tty56
crw-rw----    1 root     tty         4,  57 May  6 23:35 tty57
crw-rw----    1 root     tty         4,  58 May  6 23:35 tty58
crw-rw----    1 root     tty         4,  59 May  6 23:35 tty59
crw-------    1 root     root        4,   6 May  6 23:35 tty6
crw-rw----    1 root     tty         4,  60 May  6 23:35 tty60
crw-rw----    1 root     tty         4,  61 May  6 23:35 tty61
crw-rw----    1 root     tty         4,  62 May  6 23:35 tty62
crw-rw----    1 root     tty         4,  63 May  6 23:35 tty63
crw-------    1 root     root        4,   7 May  6 23:35 tty7
crw-------    1 root     root        4,   8 May  6 23:35 tty8
crw-------    1 root     root        4,   9 May  6 23:35 tty9
crw-rw----    1 root     uucp        4,  64 May  6 23:35 ttyS0
crw-rw----    1 root     uucp        4,  65 May  6 23:35 ttyS1
crw-rw----    1 root     uucp        4,  66 May  6 23:35 ttyS2
crw-rw----    1 root     uucp        4,  67 May  6 23:35 ttyS3
crw-rw----    1 root     root       10, 223 May  6 23:35 uinput
cr--r--r--    1 root     root        1,   9 May  6 23:35 urandom
crw-rw----    1 root     tty         7,   0 May  6 23:35 vcs
crw-rw----    1 root     tty         7,   1 May  6 23:35 vcs1
crw-rw----    1 root     tty         7, 128 May  6 23:35 vcsa
crw-rw----    1 root     tty         7, 129 May  6 23:35 vcsa1
crw-rw----    1 root     root       10,  63 May  6 23:35 vga_arbiter
drwxr-xr-x    2 root     root          60 May  6 23:35 xen
brw-rw----    1 root     root      202,  16 May  6 23:35 xvdb
brw-rw----    1 root     root      202,  17 May  6 23:35 xvdb1
crw-rw-rw-    1 root     root        1,   5 May  6 23:35 zero

@nathanleclaire
Copy link
Contributor Author

Maybe we need CONFIG_XEN_NETDEV_FRONTEND? http://cateee.net/lkddb/web-lkddb/XEN_NETDEV_FRONTEND.html

@nathanleclaire
Copy link
Contributor Author

Yeah, CONFIG_XEN_NETDEV_FRONTEND's gotta be it right? eth0 shows up when I boot with that enabled:

eth0      Link encap:Ethernet  HWaddr 06:FB:54:C8:55:C9
          inet addr:172.31.15.148  Bcast:172.31.15.255  Mask:255.255.240.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1174 (1.1 KiB)  TX bytes:896 (896.0 B)

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
@nathanleclaire
Copy link
Contributor Author

screen shot 2016-05-06 at 6 02 12 pm

@justincormack
Copy link
Member

Weird I thought I had enabled that...

@justincormack
Copy link
Member

Ok, added now. I thought I checked yesterday, but it wasnt set...

@justincormack
Copy link
Member

Lets merge this now its working...

@justincormack justincormack merged commit a26400f into linuxkit:master May 7, 2016
@justincormack justincormack mentioned this pull request May 7, 2016
@nathanleclaire
Copy link
Contributor Author

🎉

justincormack added a commit to justincormack/linuxkit that referenced this pull request Jul 14, 2018
Allow specifying the kernel and tarball names, or omitting tarball
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

Successfully merging this pull request may close these issues.

None yet

4 participants