I'm trying to make my own EC2 AMI. I used debootstrap to install the packages onto a partition, copied the kernel modules from the running AMI (Amazon linux) and rebooted. This is what the console output is:
Xen Minimal OS! start_info: 0xb10000(VA) nr_pages: 0x6a400 shared_inf: 0xbef32000(MA) pt_base: 0xb13000(VA) nr_pt_frames: 0x9 mfn_list: 0x967000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: root=/dev/sda1 ro 4 stack: 0x946780-0x966780 MM: Init _text: 0x0(VA) _etext: 0x621f5(VA) _erodata: 0x76000(VA) _edata: 0x7b6d4(VA) stack start: 0x946780(VA) _end: 0x966d34(VA) start_pfn: b1f max_pfn: 6a400 Mapping memory range 0xc00000 - 0x6a400000 setting 0x0-0x76000 readonly skipped 0x1000 MM: Initialise page allocator for e6c000(e6c000)-0(6a400000) MM: done Demand map pfns at 6a401000-7a401000. Heap resides at 7a402000-ba402000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0x6a401000. Initialising scheduler Thread "Idle": pointer: 0x7a402008, stack: 0x6a030000 Initialising xenbus Thread "xenstore": pointer: 0x7a402478, stack: 0x6a040000 Dummy main: start_info=0x966880 Thread "main": pointer: 0x7a4028e8, stack: 0x6a050000 "main" "root=/dev/sda1" "ro" "4" vbd 2049 is hd0 ******************* BLKFRONT for device/vbd/2049 ********** backend at /local/domain/0/backend/vbd/571/2049 Failed to read /local/domain/0/backend/vbd/571/2049/feature-barrier. Failed to read /local/domain/0/backend/vbd/571/2049/feature-flush-cache. 10485760 sectors of 0 bytes ************************** vbd 2051 is hd1 ******************* BLKFRONT for device/vbd/2051 ********** backend at /local/domain/0/backend/vbd/571/2051 Failed to read /local/domain/0/backend/vbd/571/2051/feature-barrier. Failed to read /local/domain/0/backend/vbd/571/2051/feature-flush-cache. 1835008 sectors of 0 bytes ************************** [H [J GNU GRUB version 0.97 (1740800K lower / 0K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grubdom> [9;10H
I don't really understand what's failing.
More info:
So here's what I do: I create a GB volume, boot an Amazon Linux AMI, mount the volume as say /dev/sdf, create a partition /dev/sdf1, mkfs.ext3 a filesystem on sdf1, debootstrap Debian to it, install a kernel image, create the menu.lst file:
Default 0 Timeout 3 Fallback 1
title Debian root (hd0,0) kernel /boot/vmlinuz-2.6.32-5-686 root=/dev/sda1 initrd /boot/initrd.img-2.6.32-5-686
Then I shutdown the Amazon Linux AMI, create a snapshot of the EBS volume, create an AMI from it (using either hd0 or hd00, setting the root device to /dev/sda1 - I set the root partition to be mounted from /dev/sda1 in fstab) and try to boot it. And it fails. This is the console output I can see:
Xen Minimal OS! start_info: 0xb10000(VA) nr_pages: 0x6a400 shared_inf: 0x00ba8000(MA) pt_base: 0xb13000(VA) nr_pt_frames: 0x9 mfn_list: 0x967000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: root=/dev/sda1 ro 4 stack: 0x946780-0x966780 MM: Init _text: 0x0(VA) _etext: 0x61e65(VA) _erodata: 0x76000(VA) _edata: 0x7b6d4(VA) stack start: 0x946780(VA) _end: 0x966d34(VA) start_pfn: b1f max_pfn: 6a400 Mapping memory range 0xc00000 - 0x6a400000 setting 0x0-0x76000 readonly skipped 0x1000 MM: Initialise page allocator for e6c000(e6c000)-0(6a400000) MM: done Demand map pfns at 6a401000-7a401000. Heap resides at 7a402000-ba402000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0x6a401000. Initialising scheduler Thread "Idle": pointer: 0x7a402008, stack: 0x6a030000 Initialising xenbus Thread "xenstore": pointer: 0x7a402478, stack: 0x6a040000 Dummy main: start_info=0x966880 Thread "main": pointer: 0x7a4028e8, stack: 0x6a050000 "main" "root=/dev/sda1" "ro" "4" vbd 2049 is hd0
BLKFRONT for device/vbd/2049 **********
backend at /local/domain/0/backend/vbd/1784/2049 Failed to read /local/domain/0/backend/vbd/1784/2049/feature-barrier. Failed to read /local/domain/0/backend/vbd/1784/2049/feature-flush-cache. 10485760 sectors of 0 bytes
vbd 2051 is hd1
BLKFRONT for device/vbd/2051 **********
backend at /local/domain/0/backend/vbd/1784/2051 Failed to read /local/domain/0/backend/vbd/1784/2051/feature-barrier. Failed to read /local/domain/0/backend/vbd/1784/2051/feature-flush-cache. 1835008 sectors of 0 bytes
[H [J
GNU GRUB version 0.97 (1740800K lower / 0K upper memory)
[m [4;2H+-------------------------------------------------------------------------+ [5;2H| [5;76H| [6;2H| [6;76H| [7;2H| [7;76H| [8;2H| [8;76H| [9;2H| [9;76H| [10;2H| [10;76H| [11;2H| [11;76H| [12;2H| [12;76H| [13;2H| [13;76H| [14;2H| [14;76H| [15;2H| [15;76H| [16;2H| [16;76H| [17;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. [5;78H [m [7m [5;3H Debian [5;75H [m [m [6;3H [6;75H [m [m [7;3H [7;75H [m [m [8;3H [8;75H [m [m [9;3H [9;75H [m [m [10;3H [10;75H [m [m [11;3H [11;75H [m [m [12;3H [12;75H [m [m [13;3H [13;75H [m [m [14;3H [14;75H [m [m [15;3H [15;75H [m [m [16;3H [16;75H [m [16;78H [5;75H