0

I followed these instructions to install Alpine Linux on EC2. Everything went well and I was able to create an AMI from which I can launch new instances.

My instance is supposed to act like a NAT Gateway. I, then, enabled net.ipv4.ip_forward and configured iptables similar to how it's described in the AWS documentation, but for Alpine instead. Then, I created a new AMI, which, in theory, should've been able to launch my pre-configured NAT instances.

After scratching my head for hours trying to figure out why my instances in my private subnets were not able to access the Internet, I realized the NAT instances I was launching from the AMI had not persisted the iptables and net.ipv4.ip_forward configuration. The 'iptables' package wasn't even installed to begin with.

I, then, found out that the EBS root volume (/dev/xvda) was not being mounted on /, but rather on /media/xvda, meaning my modifications to, say, /etc/init.d are not going to be included in the EBS snapshot, right?

df -h

Now, I'm stuck because I don't know what to do. I tried Googling and looking at the AWS documentation for EBS root volumes, but I don't know how such mount point is determined and how I'd be able to change it so that it's mounted on /. How can I go about solving this?

1 Answers1

0

Turns out I just had to do lbu commit -d xvda to save my changes to the apkovl file. Apparently, Alpine Linux mounts your devices by default under /media/ and if you need to save your changes to /etc/, you need to commit them using the lbu command.