views:

1797

answers:

5

I have an Amazon EC2 instance using the Amazon-supplied Fedora 8 64-bit AMI, which I would like to upgrade to Fedora 10.

I tried doing this by running "yum update" to upgrade the kernel and all packages. This seemed to work fine and I see that I now have the fc10 kernel installed, and all of my installed packages have also been updated to the Fedora 10 versions.

However, I also noticed that the fc8 kernel is still installed, and when I reboot my image it comes back running the fc8 kernel, not the fc10 kernel (I'm inferring this from the output of "uname -a").

Are there some additional steps I need to take to get my image to boot under the fc10 kernel, or is this even possible ? The Amazon documentation didn't turn up anything useful for me.

+2  A: 

Looks like you can't. This guy tried, but has not succeeded yet.

http://developer.amazonwebservices.com/connect/thread.jspa?messageID=72964#72964

sjbotha
+1  A: 

In my experience with OpenSolaris AMIs, this is not possible. The pkg image-update tool is also disabled in EC2 environment to precisely prevent this from happening. The reasoning could be that every image is associated with a specific ramdisk and kernel (aki and ari). And, they cannot be updated to new ones. I think, this holds for other AMIs too, as observed in your case.

Epitaph
A: 

Probably your best bet is to create your own AMI; the kernel you get when you load an AMI is whatever kernel was running when the AMI was created.

Thanks, Amy - I tried this, but what I found was that the kernel you get when you load an AMI is the one that was running when the instance from which the AMI was created, was instantiated. So if you start with FC8, upgrade to FC10, roll an AMI and launch the new AMI,it's still running FC8 kernel.
gareth_bowles
+1  A: 

Technically, at least until recently, you could not select a kernel. You could only select which modules you get to package in the image. Amazon retains full control over the kernel. This is probably necessary because the Xen virtualization has to interact with the kernel in some special way.

In recent updates (several months ago, last time I checked), Amazon has extended some of their API and tools to allow you to select from one of a few kernels they provide. For example, you could choose between 2.6.16 and 2.6.18.

It looked as though there might eventually be support for building your own "kernel image," but the tools necessary for this were not complete. I am guessing they (Amazon) were providing this capability to special partners only, as I saw several third-party images crop up that had special associated kernel images.

scientastic
+1  A: 

You cannot upload your own kernel image to EC2/Amazon. Only authorized users can upload kernel images. Even when you upload your own Linux OS image and boot from it in EC2, a predetermined kernel is loaded that is not the same as the one you initially uploaded. This is a policy decision made by Amazon. The most you can do is to change the default kernel version selecting from a list of predetermined and available amazon kernels that you want your instance to boot up with.

You can however build your own kernel module(s) or rebuild the ones for the kernel that gets loaded. Compiling your own module or recompiling the modules provided by the kernel being loaded gets a bit tricky as the kernel in amazon is a modified one with Xen hypervisor. You need to find out the specific kernel source code that gets loaded in your instance.

Cheers

Ernesto Benedito

Ernesto Benedito