Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Coming from a regular syslinux prompt is there any way to set the node's hostname? Basically I'm trying to start an install and the syslog= parameter needs to have the hostname set. It doesn't look like it's getting set by DHCP.
It depends also on the distro you use. In RHEL for example I set it in /etc/sysconfig/network, neither of the above mentioned files exist in RHEL5.5. In Debian you can use the /etc/hostname file but /etc/rc.conf doesn't exist. And so on...
In future when asking a question please provide us with information about the distro you're using so that more fine-grained solutions can be offered.
I have been trying to figure out the deal here. syslog ought to be started before networking so it really can't have any hostname. (I could be wrong) Further why would one need to have it at syslog creation time?
DHCP does have an option I believe to send a hostname but only if the server is set and known to work but it also requires that the boot process be kind of far along. Unless you are pxe booting then that is a whole different ball of wax.
Thanks for the replies, is it possible to access the command prompt edit the sysconfig and "service network restart" to set the hostname to whatever it needs to be during a fresh install? I tried the ALT-F1-7 thing but all I got were some blank screens and two buffers of some sort (one of which looks like the syslog). Basically the use case is large deployment with kickstarts on plenty of machines taking care of it with %pre, but some machines have to be manually installed but the install is being remotely monitored by a single group of people and they need to be able to differentiate between this manual install and that manual install.
Sorry, after reading your last post I noticed you're referring to the installation process, so disregard my previous post. That only works when you have your system installed. But you mentioned kickstart, why don't you set the hostname from within kickstart? I use it like this:
With that line at the install part of kickstart, that is before %pre you can set your complete network environment.
Just found this on the Internet on how to ask user input from the %post section of kickstart. Perhaps you can use that to ask for the hostname and then change the necessary files on the system. Since it's in %post it will work and on reboot after installation your hostname will be set:
Quote:
This is the workaround. If you sent the questions you want to ask to tty6 you can fill them in. In tty1 to tty4 runs bussybox so you won't be able to get the user input. When you press enter in tty1 to tty4 he will activate the console and will not understand the input.
Code:
%post
exec < /dev/tty6 > /dev/tty6
chvt 6
clear
echo "################################"
echo "# Running Post Configuration #"
echo "################################"
your commands
###Go back to tty1##
exec < /dev/tty1 > /dev/tty1
chvt 1
Haven't tried the above yet so it's up to you for testing. Please let us know if it works out.
Kind regards,
Eric
Last edited by EricTRA; 04-30-2011 at 11:02 AM.
Reason: Possible solution
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.