Closed unixfox closed 2 years ago
Booting on a cloud provider is completely untested!
However, I do think it is very interesting to investigate this. I think one issue might be that the image is expecting to be booted as a ram disk and not from a hard drive, which might not be properly mounted.
Hello, thank you for your reply!
It is indeed interesting to try to make slim working for AWS because that would allow some great possibilities for the cloud like creating small AMI that would be used for microservice.
My current use case of slim is to quickly launch a Minecraft server on AWS EC2.
@chrisparnin According to the alpine wiki to boot on AWS we just need to install a bootloader: https://wiki.alpinelinux.org/wiki/Install_Alpine_on_Amazon_EC2#EBS_Backed_HVM_AMI Would this be feasible to do on slim? If so how would I do that?
And about the fact that the image is booted as a ram disk I don't think it's the cause because linuxkit has support for AWS and it uses a ram disk as well. They discussed that here: https://github.com/linuxkit/linuxkit/issues/95
Quick update. I managed to boot slim on AWS but it crashed due to a kernel panic. I manually installed the bootloader using this method: https://wiki.archlinux.org/index.php/Syslinux#Manual_install and I used this syslinux configuration: https://github.com/ottomatica/slim/blob/master/scripts/syslinux/isolinux.cfg
The error is that it doesn't find the root filesystem:
[ 0.000000] Linux version 4.14.127-0-virt (buildozer@build-3-8-x86_64) (gcc version 6.4.0 (Alpine 6.4.0)) #1-Alpine SMP Tue Jun 18 13:57:52 UTC 2019
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz modules=loop,squashfs,sd-mod,usb-storage console=tty0 console=ttyS0,115200 initrd=/boot/initrd
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000fc000000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.7 present.
[ 0.000000] DMI: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
[ 0.000000] Hypervisor detected: Xen HVM
[ 0.000000] Xen version 4.2.
[ 0.000000] Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[ 0.000000] Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[ 0.000000] You might have to change the root device
[ 0.000000] from /dev/hd[a-d] to /dev/xvd[a-d]
[ 0.000000] in your root= kernel command line option
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] e820: last_pfn = 0x40000 max_arch_pfn = 0x400000000
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000000] RAMDISK: [mem 0x3ebd7000-0x3fffffff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000EA020 000024 (v02 Xen )
[ 0.000000] ACPI: XSDT 0x00000000FC00E2A0 000054 (v01 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: FACP 0x00000000FC00DF60 0000F4 (v04 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: DSDT 0x00000000FC0021C0 00BD19 (v02 Xen HVM 00000000 INTL 20090123)
[ 0.000000] ACPI: FACS 0x00000000FC002180 000040
[ 0.000000] ACPI: FACS 0x00000000FC002180 000040
[ 0.000000] ACPI: APIC 0x00000000FC00E060 0000D8 (v02 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: HPET 0x00000000FC00E1B0 000038 (v01 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: WAET 0x00000000FC00E1F0 000028 (v01 Xen HVM 00000000 HVML 00000000)
[ 0.000000] ACPI: SSDT 0x00000000FC00E220 000031 (v02 Xen HVM 00000000 INTL 20090123)
[ 0.000000] ACPI: SSDT 0x00000000FC00E260 000033 (v02 Xen HVM 00000000 INTL 20090123)
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x000000003fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009dfff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000003fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003fffffff]
[ 0.000000] ACPI: PM-Timer IO Port: 0xb008
[ 0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-47
[ 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 low level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 low level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 low level)
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 15 CPUs, 14 hotplug CPUs
[ 0.000000] e820: [mem 0x40000000-0xfbffffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on Xen HVM
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.000000] random: get_random_bytes called from start_kernel+0x8f/0x454 with crng_init=0
[ 0.000000] setup_percpu: NR_CPUS:32 nr_cpumask_bits:32 nr_cpu_ids:15 nr_node_ids:1
[ 0.000000] percpu: Embedded 44 pages/cpu s141208 r8192 d30824 u262144
[ 0.000000] PV qspinlock hash table entries: 256 (order: 0, 4096 bytes)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 257928
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz modules=loop,squashfs,sd-mod,usb-storage console=tty0 console=ttyS0,115200 initrd=/boot/initrd
[ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[ 0.000000] log_buf_len total cpu_extra contributions: 57344 bytes
[ 0.000000] log_buf_len min size: 16384 bytes
[ 0.000000] log_buf_len: 131072 bytes
[ 0.000000] early log buf free: 9236(56%)
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Memory: 988544K/1048180K available (8204K kernel code, 752K rwdata, 2108K rodata, 1116K init, 292K bss, 59636K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=15, Nodes=1
[ 0.000000] Kernel/User page tables isolation: enabled
[ 0.010000] Hierarchical RCU implementation.
[ 0.010000] RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=15.
[ 0.010000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=15
[ 0.010000] NR_IRQS: 4352, nr_irqs: 952, preallocated irqs: 16
[ 0.010000] xen:events: Using 2-level ABI
[ 0.010000] xen:events: Xen HVM callback vector for event delivery is enabled
[ 0.010000] Console: colour VGA+ 80x25
[ 0.010000] console [tty0] enabled
[ 0.010000] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
[ 0.010000] console [ttyS0] enabled
[ 0.010000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 30580167144 ns
[ 0.020000] tsc: Fast TSC calibration using PIT
[ 0.020004] tsc: Detected 2394.476 MHz processor
[ 0.030009] Calibrating delay loop (skipped), value calculated using timer frequency.. 4788.98 BogoMIPS (lpj=23944920)
[ 0.040006] pid_max: default: 32768 minimum: 301
[ 0.044321] ACPI: Core revision 20170728
[ 0.054212] ACPI: 3 ACPI AML tables successfully acquired and loaded
[ 0.060052] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.070007] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.080010] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
[ 0.086789] Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
[ 0.090008] Spectre V2 : Mitigation: Full generic retpoline
[ 0.100004] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[ 0.110007] Speculative Store Bypass: Vulnerable
[ 0.115726] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[ 0.125431] smpboot: Max logical packages: 15
[ 0.130832] x2apic: IRQ remapping doesn't support X2APIC mode
[ 0.140009] Switched APIC routing to physical flat.
[ 0.148279] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
[ 0.260369] clocksource: xen: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.270024] installing Xen timer for CPU 0
[ 0.275055] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz (family: 0x6, model: 0x3f, stepping: 0x2)
[ 0.280047] cpu 0 spinlock event irq 53
[ 0.284704] Performance Events: unsupported p6 CPU model 63 no PMU driver, software events only.
[ 0.290066] Hierarchical SRCU implementation.
[ 0.295152] NMI watchdog: Perf event create on CPU 0 failed with -2
[ 0.300011] NMI watchdog: Perf NMI watchdog permanently disabled
[ 0.306598] smp: Bringing up secondary CPUs ...
[ 0.310008] smp: Brought up 1 node, 1 CPU
[ 0.314918] ----------------
[ 0.318031] | NMI testsuite:
[ 0.320008] --------------------
[ 0.323376] remote IPI: ok |
[ 0.326582] local IPI: ok |
[ 0.329777] --------------------
[ 0.330011] Good, all 2 testcases passed! |
[ 0.334145] ---------------------------------
[ 0.338233] smpboot: Total of 1 processors activated (4788.98 BogoMIPS)
[ 0.340453] devtmpfs: initialized
[ 0.343855] x86/mm: Memory block size: 128MB
[ 0.348068] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.350014] futex hash table entries: 4096 (order: 6, 262144 bytes)
[ 0.355527] NET: Registered protocol family 16
[ 0.360287] cpuidle: using governor ladder
[ 0.364160] cpuidle: using governor menu
[ 0.368206] ACPI: bus type PCI registered
[ 0.370009] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.376424] PCI: Using configuration type 1 for base access
[ 0.383242] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.389464] ACPI: Added _OSI(Module Device)
[ 0.390017] ACPI: Added _OSI(Processor Device)
[ 0.395104] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.399540] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.403673] ACPI: Interpreter enabled
[ 0.407256] ACPI: (supports S0 S3 S5)
[ 0.410010] ACPI: Using IOAPIC for interrupt routing
[ 0.414778] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.420483] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.484023] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.490018] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.497056] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.500009] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.510969] acpiphp: Slot [0] registered
[ 0.517028] acpiphp: Slot [3] registered
[ 0.520582] acpiphp: Slot [4] registered
[ 0.527632] acpiphp: Slot [5] registered
[ 0.530633] acpiphp: Slot [6] registered
[ 0.535733] acpiphp: Slot [7] registered
[ 0.540415] acpiphp: Slot [8] registered
[ 0.545378] acpiphp: Slot [9] registered
[ 0.550679] acpiphp: Slot [10] registered
[ 0.560593] acpiphp: Slot [11] registered
[ 0.565001] acpiphp: Slot [12] registered
[ 0.569151] acpiphp: Slot [13] registered
[ 0.570553] acpiphp: Slot [14] registered
[ 0.575119] acpiphp: Slot [15] registered
[ 0.579219] acpiphp: Slot [16] registered
[ 0.580414] acpiphp: Slot [17] registered
[ 0.584626] acpiphp: Slot [18] registered
[ 0.588738] acpiphp: Slot [19] registered
[ 0.590567] acpiphp: Slot [20] registered
[ 0.599958] acpiphp: Slot [21] registered
[ 0.600432] acpiphp: Slot [22] registered
[ 0.604724] acpiphp: Slot [23] registered
[ 0.609300] acpiphp: Slot [24] registered
[ 0.610404] acpiphp: Slot [25] registered
[ 0.614539] acpiphp: Slot [26] registered
[ 0.619106] acpiphp: Slot [27] registered
[ 0.620434] acpiphp: Slot [28] registered
[ 0.625160] acpiphp: Slot [29] registered
[ 0.629688] acpiphp: Slot [30] registered
[ 0.630504] acpiphp: Slot [31] registered
[ 0.634576] PCI host bridge to bus 0000:00
[ 0.638366] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.640017] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.645329] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.650009] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfbffffff window]
[ 0.656523] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.667706] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.670009] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.674640] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.680009] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.686801] * Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
[ 0.686801] * this clock source is slow. Consider trying other clock sources
[ 0.691825] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
[ 0.707766] ACPI: PCI Interrupt Link [LNKA] (IRQs *5 10 11)
[ 0.710253] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.715333] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.720237] ACPI: PCI Interrupt Link [LNKD] (IRQs *5 10 11)
[ 0.753099] xen:balloon: Initialising balloon driver
[ 0.770292] SCSI subsystem initialized
[ 0.775912] PCI: Using ACPI for IRQ routing
[ 0.781562] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.790198] clocksource: Switched to clocksource xen
[ 0.800841] VFS: Disk quotas dquot_6.6.0
[ 0.805317] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.812429] pnp: PnP ACPI init
[ 0.816097] system 00:00: [mem 0x00000000-0x0009ffff] could not be reserved
[ 0.823533] system 00:01: [io 0x08a0-0x08a3] has been reserved
[ 0.829513] system 00:01: [io 0x0cc0-0x0ccf] has been reserved
[ 0.835550] system 00:01: [io 0x04d0-0x04d1] has been reserved
[ 0.842290] system 00:07: [io 0x10c0-0x1141] has been reserved
[ 0.848503] system 00:07: [io 0xb044-0xb047] has been reserved
[ 0.878643] pnp: PnP ACPI: found 8 devices
[ 0.889959] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.901211] NET: Registered protocol family 2
[ 0.907308] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.916628] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.924523] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.932671] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.940110] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.947875] NET: Registered protocol family 1
[ 0.953963] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.961426] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.968848] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.983126] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 0.996833] Unpacking initramfs...
[ 1.004131] Initramfs unpacking failed: no cpio magic
[ 1.016902] Freeing initrd memory: 20644K
[ 1.027320] audit: initializing netlink subsys (disabled)
[ 1.034581] audit: type=2000 audit(1566146963.238:1): state=initialized audit_enabled=0 res=1
[ 1.060221] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[ 1.071904] Key type asymmetric registered
[ 1.076798] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 1.090194] io scheduler noop registered
[ 1.094005] io scheduler deadline registered (default)
[ 1.098225] io scheduler mq-deadline registered
[ 1.102513] io scheduler kyber registered
[ 1.107404] ERST DBG: ERST support is disabled.
[ 1.113078] xen:grant_table: Grant tables using version 1 layout
[ 1.119270] Grant table initialized
[ 1.122605] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
[ 1.128931] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.168284] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 1.181934] Invalid max_queues (4), will use default max: 1.
[ 1.189010] VMware PVSCSI driver - version 1.0.7.0-k
[ 1.199498] scsi host0: ata_piix
[ 1.205397] scsi host1: ata_piix
[ 1.210334] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14
[ 1.216451] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15
[ 1.222672] xen_netfront: Initialising Xen virtual ethernet driver
[ 1.233232] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[ 1.245105] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.249388] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 1.255053] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 1.263491] rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
[ 1.270115] rtc_cmos 00:02: alarms up to one day, 114 bytes nvram, hpet irqs
[ 1.276362] IR NEC protocol handler initialized
[ 1.280965] IR RC5(x/sz) protocol handler initialized
[ 1.285005] IR RC6 protocol handler initialized
[ 1.289367] IR JVC protocol handler initialized
[ 1.293555] IR Sony protocol handler initialized
[ 1.297633] IR SANYO protocol handler initialized
[ 1.301233] IR Sharp protocol handler initialized
[ 1.305313] IR MCE Keyboard/mouse protocol handler initialized
[ 1.310085] IR XMP protocol handler initialized
[ 1.314471] gre: GRE over IPv4 demultiplexor driver
[ 1.318660] Key type dns_resolver registered
[ 1.322643] random: fast init done
[ 1.325784] sched_clock: Marking stable (1322633459, 0)->(2078186645, -755553186)
[ 1.332775] registered taskstats version 1
[ 1.382830] blkfront: xvda: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled;
[ 1.396219] xvda: xvda1
[ 1.440149] rtc_cmos 00:02: setting system clock to 2019-08-18 16:49:23 UTC (1566146963)
[ 1.448991] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
[ 1.456640] List of all partitions:
[ 1.461048] ca00 1048576 xvda
[ 1.461049] driver: vbd
[ 1.466931] ca01 1047552 xvda1 5b4f9364-01
[ 1.466932]
[ 1.473212] No filesystem could mount root, tried:
[ 1.473213]
[ 1.479647] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.488024] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.127-0-virt #1-Alpine
[ 1.494553] Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
[ 1.499863] Call Trace:
[ 1.502979] dump_stack+0x5d/0x79
[ 1.506596] panic+0xe2/0x233
[ 1.510250] mount_block_root+0x276/0x29a
[ 1.514763] ? set_debug_rodata+0xc/0xc
[ 1.518942] prepare_namespace+0x130/0x166
[ 1.523364] kernel_init_freeable+0x1d6/0x1e1
[ 1.527995] ? rest_init+0xa0/0xa0
[ 1.531920] kernel_init+0x5/0xeb
[ 1.535890] ret_from_fork+0x35/0x40
[ 1.539945] Kernel Offset: 0x2e000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
Ok I don't know how I got it working... it's unbelievable:
I literally did some hacky stuff to get that working.
I had to launch an AMI from linuxkit, then mounting the filesystem of that AMI to another EC2/VPS, after that I replaced the files vmlinuz
and initrd
(originally from linuxkit) with the files generated by slim: slim build images/alpine3.8-simple -p kvm
.
Amazing! This should help identify what's the delta needed on the images to make them ami-bootable.
There is a big software engineering conference deadline coming up this Friday, but we'll be able to dig into this more after that.
No problem, I'm not here to urge you to add the AWS support for slim. I just wanted to see if I would be able to use slim on AWS in the future for my current project or if I would have to fallback to linuxkit.
About the real magic to make slim booting on AWS here is the content of the AMI:
[root@ip-172-31-3-6 slim]# ls -l
total 80940
-rw------- 1 root root 70188570 Apr 18 2017 initrd.img
-rw------- 1 root root 8029056 Apr 18 2017 kernel
-r--r--r-- 1 root root 116092 Aug 18 18:48 ldlinux.c32
-r--r--r-- 1 root root 69632 Aug 18 18:48 ldlinux.sys
drwx------ 2 root root 16384 Aug 18 18:48 lost+found
-rw-r--r-- 1 root root 93 Aug 18 18:48 syslinux.cfg
Note: initrd.img is the same type as the initrd of slim. And kernel is the same type as the vmlinuz of slim.
Here is the content of the syslinux.cfg
file:
DEFAULT linux
LABEL linux
KERNEL /kernel
INITRD /initrd.img
APPEND console=ttyS0
I uploaded here the content of the two other file: ldlinux.c32.zip ldlinux.sys.zip
I think most of the magic that linuxkit does to render a ramdisk bootable as an AMI is here: https://github.com/linuxkit/linuxkit/blob/master/src/cmd/linuxkit/moby/output.go
Hello,
I'm trying to boot an image from slim on AWS EC2 but I'm unable to make it work:
Here what I did to convert an image from slim to an AMI:
slim build images/alpine3.8-simple -f qcow2 -p kvm
cd ~/.slim/registry/alpine3.8-simple
qemu-img convert slim.qcow2 slim.raw
aws s3 cp slim.raw s3://slimiso
aws ec2 import-snapshot --description "slim image" --disk-container file://container.json
Can someone help me to make an image from slim booting properly on AWS EC2?