[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-users] Re: changing hostname in a chroot [was: changing settings]
- To: Charles Duffy <cduffy@xxxxxxxxxxx>
- 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=
- List-id: Xen user discussion <xen-users.lists.xensource.com>
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
|