CentOS 8 AMI availability in AWS

Issues related to applications and software problems and general support
User avatar
TrevorH
Forum Moderator
Posts: 29693
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8 AMI availability in AWS

Post by TrevorH » 2020/02/04 15:50:19

The dracut-initqueue message means it can't find your root filesystem. Most likely your initramfs is missing a required driver for the disk controller. I see messages there are PATA, did you include SATA support too? Or whatever disk controller the root filesystem is sitting behind?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

RobertHue
Posts: 3
Joined: 2020/01/30 09:27:35

Re: CentOS 8 AMI availability in AWS

Post by RobertHue » 2020/02/06 09:28:34

Thanks, indeed something is missing.. I would expect a xen/blkfront message after the PATA one regarding the rootfs.

adrian27
Posts: 13
Joined: 2020/02/06 12:04:15

Re: CentOS 8 AMI availability in AWS

Post by adrian27 » 2020/02/06 12:34:21

What about unofficial centos 8.1 images? Aren't they of any help? Did a search for centos 8.1 in the aws marketplace, and a bunch came out. Tested the following, and they worked fine.

CentOS 8 Minimal: https://aws.amazon.com/marketplace/pp/B083V66BJ4
CentOS Stream Minimal: https://aws.amazon.com/marketplace/pp/B0847MKS85

You can boot one of those, and look in the /boot to see what kernel are they using, boot parameters, etc.

aks
Posts: 3032
Joined: 2014/09/20 11:22:14

Re: CentOS 8 AMI availability in AWS

Post by aks » 2020/02/09 17:23:19

Given the failure specified, I suspect it can't "find" the root device.

From the docs (https://docs.aws.amazon.com/vm-import/l ... mport.html):
For some operating systems, the device drivers for enhanced networking and NVMe block devices that are required by Nitro-based instances are not installed automatically during import. To install these drivers manually, use the directions in the following documentation. Next, create a new AMI from the customized instance.
Perhaps you chose a non XEN instance (also ignoring the difference between KVM /dev/vd* and AWS XEN /dev/xvd* and Nitro's /dev/nvme*)?

aks
Posts: 3032
Joined: 2014/09/20 11:22:14

Re: CentOS 8 AMI availability in AWS

Post by aks » 2020/03/04 18:01:47

Raising this thread from the dead, with a slightly new idea.

I came across this: https://github.com/claranet/centos7-ami from somewhere (I can't remember).

It seems reasonable, boot an instance and "install root" on a second disk (well that's kind of what the installer does, last time I looked). Post install, attach second disk to an instance as the first disk and boot. Just remember to add the drivers for XEN (gen. 2) and Nitro (gen. 3) AWS to initrd and you should be able to boot both.

I have not tried this, because I don't have the time at work to try it out (I did intend to) and secondly, I'm far to cheap to buy AWS for myself.

Seems easier than going through importing the image.

eohm
Posts: 1
Joined: 2020/03/18 23:50:28

Re: CentOS 8 AMI availability in AWS

Post by eohm » 2020/03/19 00:02:00

So finaly the solution why the image does not work is simple. It is just missing a dracut run, everything else seems prepared fine.
So if You want to get CentOS-8-ec2-8.1.1911-20200113.3.x86_64.qcow2 to work as expected:
1. start another EL8 EC2 instance (i.e. the official redhat)
2. create a volume from the snapshot created from raw file extracted form the qcow2 and add it to the instance as addtional volume
3. do the necessarc mounts for a chroot and run dracut:

Code: Select all

mount /dev/nvme1n1p1 /mnt
mount -t proc proc /mnt/proc
mount -t tmpfs tmpfs /mnt/run
mount -t devtmpfs devtmpfs /mnt/dev
mount -t sysfs sysfs /mnt/sys
chroot /mnt
dracut -f /boot/initramfs-4.18.0-147.3.1.el8_1.x86_64.img 4.18.0-147.3.1.el8_1.x86_64
exit
umount /mnt/sys
umount /mnt/dev
umount /mnt/run
umount /mnt/proc
umount /mnt
4. create a snapshot of the changed volume, make an image from it - and You have "the official" image "already" now..

sbingram
Posts: 1
Joined: 2020/03/22 17:18:18

Re: CentOS 8 AMI availability in AWS

Post by sbingram » 2020/03/22 17:44:35

Thanks eohm. I'm still testing it out right now, but your solution appears to work perfectly! Given the importance of cloud services like AWS, it's certainly troubling that no one at CentOS could figure this out and push out an official version, but perhaps this is a better way to go since there are no restrictions if you use your own AMI.

User avatar
Hix
Posts: 23
Joined: 2019/09/10 14:09:25
Location: Prague, CZ

Re: CentOS 8 AMI availability in AWS

Post by Hix » 2020/04/14 14:34:58

sbingram wrote:
2020/03/22 17:44:35
Given the importance of cloud services like AWS, it's certainly troubling that no one at CentOS could figure this out and push out an official version,
I second to this...
...after 20 years on BSD, we're switching to RHEL/CentOS...

stray_dog
Posts: 1
Joined: 2020/08/15 00:50:48

Re: CentOS 8 AMI availability in AWS

Post by stray_dog » 2020/08/15 00:56:38

The official AMIs have been published as documented on https://wiki.centos.org/Cloud/AWS !

Be careful to note that the AMI Owner ID is different now (for the most recent Centos 7 build as well). It should be 125523088429 which is associated with the Fedora project account. The current image name is "CentOS 8.2.2004 x86_64" for 8.2 on x64.

Someone opened a bug about the change in Owner ID here https://bugs.centos.org/view.php?id=17647 but I personally don't see this as a bug. Just something that could be clearer in their documentation.

Post Reply

Return to “CentOS 8 - General Support”