WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Re: changing hostname in a chroot [was: changing setting

To: Charles Duffy <cduffy@xxxxxxxxxxx>
Subject: Re: [Xen-users] Re: changing hostname in a chroot [was: changing settings]
From: Anand <xen.mails@xxxxxxxxx>
Date: Fri, 6 Jan 2006 02:44:14 +0530
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Jan 2006 21:19:51 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=o9ZmXRJfOXn0rBGG01qwqGzM6YcE//eqgHnd9lKOzqKq1Wdsh0ZDF4KkrdCV+QCsIaPnHF7KemFuAiWQTQ1GrR2/rHFF60eYs6VNE4X/3Au/GiMCQ0a9Mm7VphtwfKdaBlqcXbqB58JE/HWi+B2xDLete8kA6KWKdoUEBhJlW4E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <dpk1pa$2qg$1@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <acb757c00601051258o261e5027ge29fea574752fc44@xxxxxxxxxxxxxx> <dpk1pa$2qg$1@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for the clarification. I will edit the files.

On 1/6/06, Charles Duffy <cduffy@xxxxxxxxxxx> wrote:
Anand wrote:
> mount -o loop centos.img /mnt/disk
>
> Now i did a chroot to /mnt/disk and executed hostname -v xyz.test.com
> <http://xyz.test.com> and exited from it.
>
> The hostname changed inside the image, however it also changed for the
> host machine. I am confused here, after doing a chroot, shouldn't the
> hostname change only inside the chrooted image ? and not on the host
> machine ? Any help would be appreciated.

The hostname command doesn't make any changes to the disk; rather, it
only tells the running system what its hostname is.

Since you're using the same system (the same kernel) whether or not
you're in the chroot, running hostname inside a chroot is going to have
the same impact as running hostname outside your chroot.

If you want to actually change the hostname for your CentOS image, find
the configuration files in /etc used by CentOS to store the hostname,
and change those with the editor of your choice.

--

regards,

Anand
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>