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.

4 Answers 4

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.

1
  • 2
    If you're a hand-editing type, the file you want is /etc/dhcp3/dhclient.conf
    – jedberg
    Commented Aug 6, 2009 at 16:42
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.

1
  • 1
    Not true. EC2 data persists during a reboot. It disappears if you shutdown or terminate an instance. Commented Aug 13, 2009 at 14:17
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?

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .