0

I have an Ubuntu 8.10 server at Amazon's EC2, based on the ami-1c5db975 image by Eric Hammond.

After rebooting an EC2 server, the /etc/resolv.conf file is reset to a default, erasing any changes made prior to the boot.

This bug was told to be secluded problem related only to Canonical Ubuntu image, which I don't use.

  1. Do you know of any other files affected by reboot?
  2. Is there any workaround or proper solution for this bug?

Thanks,

Udi

EDIT: Problem solved, 1 month later:

Thanks for your answers and comments. I did edit the dhcp3 configuration file, but forgot to restart dhcp3:

/etc/init.d/networking restart

After running this, the resolv.conf file was automatically updated.

Adam Matan
  • 13,194
  • 19
  • 55
  • 75

4 Answers4

6

/etc/resolv.conf is reset by the DHCP client. If you want to override it, you might want to look into using resolvconf to prepend custom configuration. Note that if you override Amazon's DNS servers, transfers to/from S3 may no longer be free.

bdonlan
  • 693
  • 7
  • 14
1

Yeah, there's no way that change will persist unless you're storing it on an EBS volume. If you don't want to use EBS, you can use a different AMI image that serves your needs, or you can run a post-boot script that changes that file.

user5336
  • 2,379
  • 1
  • 15
  • 9
0

Uhm... amazon EC2 aren't persistent. If you want a persistent file system, use Amazon EBD with your EC2.

Or am I misunderstanding you?

Thomas
  • 1,476
  • 11
  • 16
0

Images are not persistant. Configuration should be fetched automatically from S3 (or elsewhere) at boot time. Some configuration can also be sent at boot time with the user-data parameter, see for example http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1085 (Using Parameterized Launches to Customize Your AMIs)

martineg
  • 150
  • 7