Score:0

EBS root volume being mounted on /media/xvda instead of / (Alpine Linux)

it flag

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?

Score:0
it flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.