Score:0

How I can restore/reset the /etc/fstab on amazon AWS EC-2 ubuntu 22.04?

cn flag

In an amazon EC-2 instance I accidentally overwrote the /etc/fstab while I was adding a setting fro swapfile:

echo "/swapfile    none    swap    sw    0    0" | sudo tee /etc/fstab 

But I have not rebooted the machin yet. How I can restore it whilst keeping the swap settings on it?

The current contents of /etc/fstab only contains:

/swapfile    none    swap    sw    0    0

The only volume that I have is the one generated upon EC-2 creation.

Score:0
cn flag

For ubuntu 2.04 instances running on Amazon EC-2 using a single volume you can use the following:

LABEL=cloudimg-rootfs   /    ext4   discard,errors=remount-ro   0 1
LABEL=UEFI  /boot/efi   vfat    umask=0077  0 1

/swapfile    none    swap    sw    0    0

Somehow Amazon has configured to use default labels for volume mounts. Keep in mind that In my case I only use a single volume that has been generated upon instance creation in your case you may need to place extra settings as well.

I sit in a Tesla and translated this thread with Ai:

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.