# Rocky Linux official AWS AMI

**URL:** <https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049>\
**Category:** Rocky Linux Help & Support\
**Created:** [June 22, 2021, 9:49am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049 "2021-06-22T09:49:52Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![superfly](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@superfly](https://forums.rockylinux.org/u/superfly)\
**Post date:** [May 12, 2022, 12:27am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/21 "2022-05-12T00:27:07Z")

</div>

@jorp@neil :  
Could the Rocky Linux AMI be built without a swap partition? That would allow the storage to be configured seamlessly.

I’m pulling in Rocky Linux 8 (ami-04826709428f49157) and when we log into the console we can see it has been provisioned with 8Gb disk and a 511Mb swap partition.

The problem is that if we provision the image (via Terraform in my case) and specify a larger disk e.g. 15Gb, then the root partition does not automatically get expanded

```auto
sh-4.4$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 15G 0 disk
├─nvme0n1p1 259:1 0 7.5G 0 part /
└─nvme0n1p2 259:2 0 511M 0 part [SWAP]

```

The reason is the swap partition prevents it. The only way around it requires that the swap partition be deleted so we can run `growpart` and `resize2fs`. To delete the partition requires running `fdisk`, which is a UI and requires human interaction to delete a partition.

In other words, with the existing RockyLinux AMI, if we need a partition larger than 7.5Gb, it requires manual intervention which doesn’t work well with our otherwise-automated pipeline.

The CentOS AMI marketplace doesn’t create a swap partition, I believe for this very reason.

To reproduce: launch a RockyLinux AMI from AWS console, but specify a larger storage size than 8 e.g. 10.  
Connect to the console and confirm there is only 7.5Gb available to the root partition.

If you repeat the same exercise but with a CentOS image, you’ll see the root partition is automatically expanded to match the disk size as specified in the launch parameters.

---

<div class="post-metadata">

**Author:** ![linuxlover](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/linuxlover/32/2227_2.png) [@linuxlover](https://forums.rockylinux.org/u/linuxlover)\
**Post date:** [May 12, 2022, 6:53am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/22 "2022-05-12T06:53:21Z")

</div>

> [@superfly](#):
>
> ami-04826709428f49157

Hi,  
we are not getting any swap partition and our disk size is 200GB

```auto
[~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 200G 0 disk
└─nvme0n1p1 259:1 0 200G 0 part /
[l ~]# free -m
              total used free shared buff/cache available
Mem: 1778 448 1030 18 300 1171
Swap: 0 0 0

```

We are using below AMI

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/5/590c259640c20129e55f12b02abd2feb000bcb2c.png)

---

<div class="post-metadata">

**Author:** ![linuxlover](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/linuxlover/32/2227_2.png) [@linuxlover](https://forums.rockylinux.org/u/linuxlover)\
**Post date:** [May 12, 2022, 7:08am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/23 "2022-05-12T07:08:13Z")

</div>

Its AMI ID is ami-0a10fe11f3e1bf41e and OWNER ID is 792107900819

---

<div class="post-metadata">

**Author:** ![superfly](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@superfly](https://forums.rockylinux.org/u/superfly)\
**Post date:** [May 13, 2022, 6:09am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/24 "2022-05-13T06:09:38Z")

</div>

> [@linuxlover](#):
>
> 792107900819

Thank you @linuxlover : I indeed had the wrong AMI. My filter was “Rocky Linux 8\*” in us-east-1 and that picked up an older one, 8.4 from June 2021. Looks like the newer images have since fixed the issue.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/5/5be065aa8a73002648b3e4dac31c32d2cbe5e73c.png)

And the working one is an 8.5 version (AMI name Rocky-8-ec2-8.5-20211114.2.x86\_64)  
With the above one there is no longer a swap partition, and resizing from the AWS console works as expected.

---

<div class="post-metadata">

**Author:** ![superfly](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@superfly](https://forums.rockylinux.org/u/superfly)\
**Post date:** [May 14, 2022, 3:56am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/25 "2022-05-14T03:56:22Z")

</div>

> [@linuxlover](#):
>
> 792107900819

And for any future readers of this thread wondering about community AMIs owned by 792107900819, this is indeed the Rocky Linux account. To confirm follow the link

> [@jorp](#):
>
> Yes, it’s in the works. You can check out progress using [this issue](https://github.com/rocky-linux/rockylinux.org/issues/172).

This includes a reference to [Cloud Images | Rocky Linux](https://rockylinux.org/cloud-images/). Following the link we see

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/3/370885603141d4af62fc4136f303264724006822.png)

And picking one of those AMIs shows the RockyLinux owner

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/1/1d82c2cdfe6068f85423b5592356f88c7cedb7c7.png)

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:49am UTC](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049/26 "2023-08-25T03:49:57Z")

</div>



[Previous page](https://forums.rockylinux.org/t/rocky-linux-official-aws-ami/3049.md?page=1)
