Ask Your Question

Custom Image failed to boot

asked 2013-05-18 11:09:31 -0500

karat805 gravatar image

updated 2013-05-18 11:10:45 -0500

Hi to all. I'm using Grizzly release and I made a set of images(.aki+.ari+.ami) in full accordance with this instructions: ""

...but when I try to boot and instance form this set it tries to boot, but all I see on vnc console is: "No bootable device found", so my question is quite "noobish", but how should I use this kind of images?

I can't find nowhere how to boot Amazon style on Openstack. Thanks in advance to anyone who would help. Best Regards,Karat.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-05-21 11:31:53 -0500

jkumbhani gravatar image

It says, the image that is attached for creating instance does not have bootable drive.

You may look for creating image properly.

Can you provide the steps to create and upload image?

edit flag offensive delete link more


Sure thing, here they are:

karat805 gravatar imagekarat805 ( 2013-05-21 13:25:53 -0500 )edit

answered 2013-05-21 13:43:41 -0500

karat805 gravatar image

Sorry for this messy formatting, I'm just hurrying to answer while you around.

  1. System setup.

    kvm -m 1G -cdrom /var/lib/libvirt/images/ubuntu-12.04.2-server-amd64.iso

    -drive if=virtio,file=image.raw,boot=off -vnc :9

    gvncviewer localhost:9

    Inside of vm I performed following:

    rm /etc/udev/rules.d/70-persistent-net.rules

    apt-get install cloud-init

    echo acpiphp >> /etc/modules

  2. Then: 1) Stopped system and copied its disk to a disk image file and modified “/etc/fstab” and extract kernel-file and ramdisk files.

    echo 'systempowerdown' | socat – UNIX-CONNECT:[YOURMONITOR]# dd if=/dev/vg1/image of=/etc/scripts/image.raw

    # mount -o loop -t auto /etc/scripts/image.raw /mnt # cp /mnt/boot/vmlinuz-3.5.0-server /etc/scripts # cp /mnt/boot/initrd.img-3.5.0-server /etc/scripts # nano /etc/fstab


    # UUID=e7f5af8d-5d96-45cc-a0fc-d0d1bde8f31c / ext4 errors=remount-ro 0 1


    LABEL=uec-rootfs / ext4 defaults 0 0

    umount /mnt

2) Calculated needed offset for stripping of fs table by multiplication of a “Start block” (in our case 2048) by 512, then used calculated offset (in our case it's: 1048576) in order to setup a loop device without fs table, (it'll be used as final image).

# losetup -f /etc/scripts/server.img
   # fdisk -l /dev/loop0
   Disk /dev/loop0: 2147 MB, 2147483648 bytes                                                                                                                                                                                                     
   244 heads, 47 sectors/track, 365 cylinders, total 4194304 sectors                                                                                                                                                                              
   Units = sectors of 1 * 512 = 512 bytes                                                                                                                                                                                                         
   Sector size (logical/physical): 512 bytes / 512 bytes                                                                                                                                                                                          
   I/O size (minimum/optimal): 512 bytes / 512 bytes                                                                                                                                                                                              
   Disk identifier: 0x0008cdf6                                                                                                                                                                                                                    

      Device Boot      Start         End      Blocks   Id  System                                                                                                                                                                              
   /dev/loop0p1   *        2048     4192255     2095104   83  Linux

# root@user-pc:~# clear #

# losetup -f -o 1048576 /etc/scripts/image.raw # losetup -a # dd if=/dev/loop1 of=/etc/scripts/server.img

  1. Once my image was ready : Amazon Kernel Image(aki) - vmlinuz-3.5.0-server ; Amazon RAM Disk(ari) – initrd.img-3.5.0-server; Amazon Machine Image(ami) – server image.

    (These files needed to create “Amazon style virtual machine in openstack.”) Now we need to upload these images to glance before using them:

    #glance image-create --name ubuntu1204 --disk-format=ari --container-format=ari --file etc/scripts/initrd.img-3.5.0-23-generic #glance image-create --name ubuntu1204 --disk-format=aki --container-format=aki --file /etc/scripts/vmlinuz-3.5.0-23-generic #glance image-create --name ubuntu1204 --disk-format=ami --container-format=ami --file /etc/scripts/server.img

Done Regards, Karat

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-05-18 11:09:31 -0500

Seen: 887 times

Last updated: May 21 '13