WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Booting Micro Core in Amazon EC2  (Read 13112 times)

Offline teagy

  • Newbie
  • *
  • Posts: 16
Booting Micro Core in Amazon EC2
« on: September 18, 2012, 08:23:05 AM »
I just wanted to say that I am very close in getting Micro Core booting in EC2. However, it abruptly stops booting with no error messages after setting the language to C. I'm simply uploading a loopback image of TCL into S3 and deploying it from there. Inside the loopback file I have /boot which contains core64.gz, vmlinuz64, and grub/menu.lst. It contains etc/fstab file, a opt/* directory with the backup files listed in .filetool.lst, a tce/ with all of the packages I want installed and proc/ directory. I'm using a PV-GRUB 1.03 hd0 partitionless Amazon kernel id which will boot my image, so my grub menu.lst looks like:

Code: [Select]
default 0
timeout 0
 
title MicroCore
root (hd0)
kernel /boot/vmlinuz64 noautologin root=/ tce=/ opt=/ home=/ noswap console=hvc0
initrd /boot/core64.gz

The following is the entire system boot log on EC2:

Code: [Select]
Xen Minimal OS!
  start_info: 0xce2000(VA)
    nr_pages: 0x6a400
  shared_inf: 0xbf712000(MA)
     pt_base: 0xce5000(VA)
nr_pt_frames: 0xb
    mfn_list: 0x990000(VA)
   mod_start: 0x0(VA)
     mod_len: 0
       flags: 0x0
    cmd_line: root=/dev/sda1 ro 4
  stack:      0x94f860-0x96f860
MM: Init
      _text: 0x0(VA)
     _etext: 0x5ffbd(VA)
   _erodata: 0x78000(VA)
     _edata: 0x80ae0(VA)
stack start: 0x94f860(VA)
       _end: 0x98fe68(VA)
  start_pfn: cf3
    max_pfn: 6a400
Mapping memory range 0x1000000 - 0x6a400000
setting 0x0-0x78000 readonly
skipped 0x1000
MM: Initialise page allocator for 103e000(103e000)-6a400000(6a400000)
MM: done
Demand map pfns at 6a401000-206a401000.
Heap resides at 206a402000-406a402000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x6a401000.
Initialising scheduler
Thread "Idle": pointer: 0x206a402010, stack: 0x13b0000
Initialising xenbus
Thread "xenstore": pointer: 0x206a4027c0, stack: 0x13c0000
Dummy main: start_info=0x96f960
Thread "main": pointer: 0x206a402f70, stack: 0x13d0000
"main" "root=/dev/sda1" "ro" "4"
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********


backend at /local/domain/0/backend/vbd/1773/2049
Failed to read /local/domain/0/backend/vbd/1773/2049/feature-barrier.
Failed to read /local/domain/0/backend/vbd/1773/2049/feature-flush-cache.
1823312 sectors of 512 bytes
**************************
vbd 2050 is hd1
******************* BLKFRONT for device/vbd/2050 **********


backend at /local/domain/0/backend/vbd/1773/2050
Failed to read /local/domain/0/backend/vbd/1773/2050/feature-barrier.
Failed to read /local/domain/0/backend/vbd/1773/2050/feature-flush-cache.
312705024 sectors of 512 bytes
**************************
vbd 2051 is hd2
******************* BLKFRONT for device/vbd/2051 **********


backend at /local/domain/0/backend/vbd/1773/2051
Failed to read /local/domain/0/backend/vbd/1773/2051/feature-barrier.
Failed to read /local/domain/0/backend/vbd/1773/2051/feature-flush-cache.
1835008 sectors of 512 bytes
**************************

    [H
    [J  Booting 'MicroCore'



root (hd0)

 Filesystem type is ext2fs, using whole disk

kernel /boot/vmlinuz64 noautologin root=/ tce=/ opt=/ home=/ noswap console=hvc

0

initrd /boot/core64.gz



close blk: backend at /local/domain/0/backend/vbd/1773/2049
close blk: backend at /local/domain/0/backend/vbd/1773/2050
close blk: backend at /local/domain/0/backend/vbd/1773/2051
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.0.21-tinycore64 (root@box) (gcc version 4.2.4) #6446 SMP Sat Feb 18 13:20:23 EET 2012
Command line: noautologin root=/ tce=/ opt=/ home=/ noswap console=hvc0
ACPI in unprivileged domain disabled
released 0 pages of unused memory
Set 0 page(s) to 1-1 mapping.
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 00000000000a0000 (usable)
 Xen: 00000000000a0000 - 0000000000100000 (reserved)
 Xen: 0000000000100000 - 000000006ac00000 (usable)
NX (Execute Disable) protection: active
DMI not present or invalid.
No AGP bridge found
last_pfn = 0x6ac00 max_arch_pfn = 0x400000000
init_memory_mapping: 0000000000000000-000000006ac00000
RAMDISK: 017cf000 - 01fd0000
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  DMA32    0x00001000 -> 0x00100000
  Normal   empty
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x000000a0
    0: 0x00000100 -> 0x0006ac00
SMP: Allowing 1 CPUs, 0 hotplug CPUs
No local APIC present
APIC: disable apic facility
APIC: switched to apic NOOP
PM: Registered nosave memory: 00000000000a0000 - 0000000000100000
Allocating PCI resources starting at 6ac00000 (gap: 6ac00000:95400000)
Booting paravirtualized kernel on Xen
Xen version: 3.4.3-2.6.18 (preserve-AD)
setup_percpu: NR_CPUS:16 nr_cpumask_bits:16 nr_cpu_ids:1 nr_node_ids:1
PERCPU: Embedded 26 pages/cpu @ffff88006a3d3000 s76864 r8192 d21440 u106496
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 430320
Kernel command line: noautologin root=/ tce=/ opt=/ home=/ noswap console=hvc0
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Checking aperture...
No AGP bridge found
Memory: 1690048k/1748992k available (3879k kernel code, 448k absent, 58496k reserved, 1686k data, 576k init)
Hierarchical RCU implementation.
CONFIG_RCU_FANOUT set to non-default value of 32
NR_IRQS:768
Console: colour dummy device 80x25
console [tty0] enabled
console [hvc0] enabled
allocated 14680064 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
installing Xen timer for CPU 0
Detected 2266.746 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 4535.38 BogoMIPS (lpj=7555820)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 256
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
SMP alternatives: switching to UP code
Freeing SMP alternatives: 16k freed
Performance Events: unsupported p6 CPU model 26 no PMU driver, software events only.
Brought up 1 CPUs
Grant table initialized
NET: Registered protocol family 16
PCI: setting up Xen PCI frontend stub
bio: create slab <bio-0> at 0
ACPI: Interpreter disabled.
xen/balloon: Initialising balloon driver.
last_pfn = 0x6ac00 max_arch_pfn = 0x400000000
xen-balloon: Initialising balloon driver.
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: System does not support PCI
PCI: System does not support PCI
Switching to clocksource xen
pnp: PnP ACPI: disabled
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
UDP hash table entries: 1024 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 32768 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.
platform rtc_cmos: registered platform RTC device (no PNP device found)
Intel AES-NI instructions are not detected.
Trying to unpack rootfs image as initramfs...
fuse init (API version 7.16)
msgmni has been set to 3300
Freeing initrd memory: 8196k freed
NET: Registered protocol family 38
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
Event-channel device installed.
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Non-volatile memory driver v1.3
Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
Hangcheck: Using getrawmonotonic().
brd: module loaded
blkfront: xvda1: barrier or flush: disabled
VMware PVSCSI driver - version 1.0.1.0-k
Fixed MDIO Bus: probed
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
NET: Registered protocol family 24
Initialising Xen virtual ethernet driver.
blkfront: xvda2: barrier or flush: disabled
blkfront: xvda3: barrier or flush: disabled
Setting capacity to 312705024
xvda2: detected capacity change from 0 to 160104972288
Setting capacity to 1835008
xvda3: detected capacity change from 0 to 939524096
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
console [netcon0] enabled
netconsole: network logging started
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums_eneub6250
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
i8042: PNP: No PS/2 controller found. Probing ports directly.
i8042: No controller found
mousedev: PS/2 mouse device common for all mice
usbcore: registered new interface driver appletouch
usbcore: registered new interface driver bcm5974
rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
rtc_cmos: probe of rtc_cmos failed with error -38
Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout= 0)
cpuidle: using governor ladder
cpuidle: using governor menu
padlock_aes: VIA PadLock not detected.
padlock_sha: VIA PadLock Hash Engine not detected.
HIFN supports only 32-bit addresses.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Registering the dns_resolver key type
XENBUS: Device with no driver: device/console/0
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Freeing unused kernel memory: 576k freed

    [H
    [J
    [1;32mBooting
    [1;33mCore 4.6
    [0;39m

    [1;32mRunning Linux Kernel
    [1;33m3.0.21-tinycore64
    [1;32m.
    [0;39m

    [1;34mChecking boot options...
    [0;39m
    [1;32mDone.
    [0;39m

    [1;34mStarting udev daemon for hotplug support...
    [0;39m/input: PC Speaker as /devices/platform/pcspkr/input/input0

    [1;32mDone.
    [0;39m
loop: module loaded
zram: module is from the staging directory, the quality is unknown, you have been warned.
zram: num_devices not specified. Using default: 1
zram: Creating 1 devices ...
zram: disk size not provided. You can use disksize_kb module param to specify size.
Using default: (25% of RAM).
zcache: module is from the staging directory, the quality is unknown, you have been warned.
zcache: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint
Adding 424704k swap on /dev/zram0.  Priority:-1 extents:1 across:424704k SS

    [1;34mScanning hard disk partitions to create
    [1;33m/etc/fstab
    [0;39m

    [1;32mSetting Language to
    [1;35mC
    [1;32m Done.
    [0;39m

As you can see it just stops after setting the language with no error messages. I'm not sure why it would be stopping. Could this have anything to do with TCL not finding a filesystem?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Booting Micro Core in Amazon EC2
« Reply #1 on: September 18, 2012, 08:50:41 AM »
root=/ tce=/ opt=/ home=/
None of those are valid.

I don't know quite what you are trying to do, but it does not look like TC is the distro to do it.

Offline teagy

  • Newbie
  • *
  • Posts: 16
Re: Booting Micro Core in Amazon EC2
« Reply #2 on: September 18, 2012, 09:15:18 AM »
I'm just trying to boot a TCL instance on EC2. Why I'm trying to do this is irrelevant. Since I'm documenting everything as I go, hopefully if I have success I can post it so others can do it easily without so much hassle.

Regarding the kernel options, when I use:

root=sda1 tce=sda1 opt=sda1 home=sda1
OR
root=xvda1 tce=xvda1 opt=xvda1 home=xvda1
OR
root=hd0 tce=hd0 opt=hd0 home=hd0

It displays the same boot log as above.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Booting Micro Core in Amazon EC2
« Reply #3 on: September 18, 2012, 09:19:25 AM »
root is not a valid tc boot option.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: Booting Micro Core in Amazon EC2
« Reply #4 on: September 18, 2012, 09:19:47 AM »
Hi teagy
Quote
it just stops after setting the language with no error messages
That comes from tc-config. After that, it looks for the RTC, however, the boot log shows:
Code: [Select]
rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
rtc_cmos: probe of rtc_cmos failed with error -38
and:
Code: [Select]
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)From tc-config:
Code: [Select]
[ -n "$LANGUAGE" ] || LANGUAGE="C"
echo -n "${GREEN}Setting Language to ${MAGENTA}$LANGUAGE"
echo "LANG=$LANGUAGE" > /etc/sysconfig/language
echo "${GREEN} Done.${NORMAL}"

if [ -n "$TZ" ]; then
echo -n "${GREEN}Setting Timezone to ${MAGENTA}$TZ"
export TZ && echo "TZ=$TZ" > /etc/sysconfig/timezone
echo "${GREEN} Done.${NORMAL}"
fi

while [ ! -e /dev/rtc ]; do usleep 50000; done
if [ -n "$NOUTC" ]; then
hwclock -l -s &
else
hwclock -u -s &
fi
If I'm reading it correctly,  while [ ! -e /dev/rtc ]; do usleep 50000; done  will wait forever if it does not find the RTC.

I don't think this belongs under TCL Base, sounds more like Virtual Machines or Off Topic. Moving to VMs.
« Last Edit: September 18, 2012, 09:22:37 AM by Rich »

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Booting Micro Core in Amazon EC2
« Reply #5 on: September 18, 2012, 09:24:57 AM »
If you use 4.6.1. I have added a new boot code of nortc
10+ Years Contributing to Linux Open Source Projects.

Offline teagy

  • Newbie
  • *
  • Posts: 16
Re: Booting Micro Core in Amazon EC2
« Reply #6 on: September 18, 2012, 09:47:22 AM »
Thanks a lot Roberts for that convenient addition. Hopefully removing the rtc device check won't negatively impact the system. I was using 4.6, so I'm going to update Core, try this out and see what happens.

Offline teagy

  • Newbie
  • *
  • Posts: 16
Re: Booting Micro Core in Amazon EC2
« Reply #7 on: September 18, 2012, 01:23:31 PM »
Success! Ok, I've got Tiny Core booting in Amazon EC2. Once I've finished all of my documentation, I'll come back and post it. To be honest, I wanted to try TCL out on EC2 because of how fast it could boot which significantly improves the boot time on EC2 vs the Ubuntu 25-30 sec boot times from the stock images.

Offline duncan mac { w₃ }

  • Newbie
  • *
  • Posts: 1
    • duncan mac { w₃ }
Re: Booting Micro Core in Amazon EC2
« Reply #8 on: May 02, 2013, 09:18:51 AM »
Success! Ok, I've got Tiny Core booting in Amazon EC2. Once I've finished all of my documentation, I'll come back and post it.

I'd be very interested in reading your conclusions as I'd like to do the same on GreenQloud, an Icelandic EC2 clone powered by renewable energy.

Thanks in advance!

Offline tembenite

  • Newbie
  • *
  • Posts: 2
Re: Booting Micro Core in Amazon EC2
« Reply #9 on: December 29, 2017, 04:13:47 PM »
Success! Ok, I've got Tiny Core booting in Amazon EC2. Once I've finished all of my documentation, I'll come back and post it. To be honest, I wanted to try TCL out on EC2 because of how fast it could boot which significantly improves the boot time on EC2 vs the Ubuntu 25-30 sec boot times from the stock images.

Any chance you might post the documentation? Especially with the nano instances now, this sounds REALLY interesting.

Offline aw

  • Newbie
  • *
  • Posts: 45
Re: Booting Micro Core in Amazon EC2
« Reply #10 on: January 02, 2018, 08:01:42 PM »
I've got TinyCore running on EC2 (EBS backed HVM). I mostly followed instructions from this Alpine Linux guide https://wiki.alpinelinux.org/wiki/Install_Alpine_on_Amazon_EC2. Obviously, you'll need to hack around a bit, but it's quite easy if you're somewhat capable with Linux.
github.com/aw