PDA

View Full Version : How do I make Anaconda ask for hostname?


PryGuy
16th December 2010, 06:50 PM
Good day everyone!
I build a Fedora server install (not live!) CD that uses a kickstart for an automated install. The question is, is it possible to make Anaconda ask for a hostname during the install?

Thanks in advance!

AndrewSerk
16th December 2010, 08:14 PM
Hello,
This is just a guess but, have you tried something like this in the %post section:

cat >> /etc/network << FOE
NETWORKING=yes
HOSTNAME=$host.$domain
FOE

PryGuy
17th December 2010, 05:52 AM
$host.$domain are variables hard coded by me? That's not what I want to. I want Anaconda to ask for it, like it does during the ordinary install.

AndrewSerk
17th December 2010, 01:05 PM
yep, I miss read your post and gave a bad answer since the proper way to set a hostname in a ks is with the --hostname= directive.

I wonder if you use the asknetwork directive if it asks for hostname

asknetwork
Prompt for network configuration in the first stage of installation regardless of installation method.

I bet the info is here somewhere: http://fedoraproject.org/wiki/Category:Anaconda

PryGuy
17th December 2010, 05:27 PM
It asks for network settings, not a hostname... :confused:
Thanks for this tip though.

AndrewSerk
17th December 2010, 05:52 PM
There should be a way to make Anaconda ask for a hostname during a ks install instead of setting it in the ks, but I can't seem to find the way. The only other option I know of is to use the interactive directive. Not really what you want but may give you the option to set/change hostname.

interactive (optional)
Uses the information provided in the kickstart file during the installation, but allow for inspection and modification of the values given. You are presented with each screen of the installation program with the values from the kickstart file. Either accept the values by clicking Next or change the values and click Next to continue. Refer to the autostep command.

PryGuy
17th December 2010, 05:59 PM
Yes, you are right. I've filled a bug (https://bugzilla.redhat.com/show_bug.cgi?id=664000). There seems to be a fix for RHEL (https://bugzilla.redhat.com/attachment.cgi?id=291413&action=diff).

PryGuy
18th December 2010, 02:10 PM
AndrewSerk, just read the comments to the bug I filled (https://bugzilla.redhat.com/show_bug.cgi?id=664000). I wonder why Fedora team does this?

---------- Post added at 05:10 PM ---------- Previous post was at 05:10 PM ----------

'interactive' didn't work for me :(

AndrewSerk
18th December 2010, 03:42 PM
interactive' didn't work for me :(

Have you tried to set a hostname in your ks and use the interactiive directive. I was hopping that if the hostname was set in the ks file that the interactive directive would give you a chance to change/modify it.

Dang test-bed distro's! You never know what you will get.

PryGuy
18th December 2010, 03:55 PM
The 'nteractive' option didn't work for me at all. I have a feeling they've removed it. It's pity to see how they ruin this great distro. I really see no logic in the Chris Lemens' (the guy who answered me on bugzilla) words. That's probably 'cause they are devs and we are admins. They are certain us admins always have ability (right, resources) to install DHCP servers and stuff and perform rollouts the way they want us to.

That's not freedom if you ask me, that's inflexibility.

AndrewSerk
18th December 2010, 04:30 PM
Make sure you don't have the autostep directive in your ks as that might keep interactive from working
The interactive directive is still in the kickstart options of f14's documentation. http://docs.fedoraproject.org/en-US/Fedora/14/html/Installation_Guide/s1-kickstart2-options.html

Fedora is locking us out of more and more setting every release in a attempt to make it more user friendly for noobs.:mad: I am looking forward to the day the Centos Devs finish 6.

PryGuy
19th December 2010, 04:14 PM
No, I didn't use the autostep option. Should I just put 'interactive' in the ks file like I used to do?

---------- Post added at 07:14 PM ---------- Previous post was at 03:22 PM ----------

Okay, Chris said (https://bugzilla.redhat.com/show_bug.cgi?id=581218#c7): Interactive kickstart installs have been deprecated, given this and other
similar difficulties. Note that this only applies to use of the "interactive"
command. Omitting information from a kickstart file will still cause anaconda
to stop and prompt for it. Pay attention to last sentence. How does it fit with the things he said about my problem (https://bugzilla.redhat.com/show_bug.cgi?id=664000)?

AndrewSerk
19th December 2010, 04:23 PM
No, I didn't use the autostep option. Should I just put 'interactive' in the ks file like I used to do?

---------- Post added at 07:14 PM ---------- Previous post was at 03:22 PM ----------

Okay, Chris said (https://bugzilla.redhat.com/show_bug.cgi?id=581218#c7): Pay attention to last sentence. How does it fit with the things he said about my problem (https://bugzilla.redhat.com/show_bug.cgi?id=664000)?

:confused::eek::confused:
So what use ;
network --bootproto= --ip= --netmask= --gateway= --nameserver= --hostname=

leaving everything blank to cause it to ask? I guess you will have to do some testing to figure out how/if this is going to work. Let us know if you get it figured out.

PryGuy
19th December 2010, 04:40 PM
:confused::eek::confused:
So what use ;
network --bootproto= --ip= --netmask= --gateway= --nameserver= --hostname=

leaving everything blank to cause it to ask? I guess you will have to do some testing to figure out how/if this is going to work. Let us know if you get it figured out.I think I've tried putting it with --hostname alone (network --dootproto=dhcp --hostname=). Didn't work.

According to Chris:
1. Interactive option doesn't work anymore (though it's still present in the F14's manual)
2. Anaconda should stop and ask if there's not enough information. So, according to Chris, my bug is a bug, though he denies it.

AndrewSerk
19th December 2010, 04:50 PM
Andrew kicks at the ground, his dog takes off running, while Andrew throws his hands up in the air and mumbles something incomprehensible about devs, progress, and steps backwards.

PryGuy
19th December 2010, 04:51 PM
Soory, but what do you want to say by that?

AndrewSerk
19th December 2010, 05:00 PM
Soory, but what do you want to say by that?

I don't mean to be bashing the dev's, especially since they are not here. It's just that progress doesn't always move things forward. Such is life.

PryGuy
19th December 2010, 06:19 PM
Ah, agree. But this is a serious thing IMO and I just can't understand their ignorance. Such bugs (I do insist it's a bug) make corporate customers switch to other distros.

AndrewSerk
19th December 2010, 06:58 PM
It is a bug in my book also.

Husainabad - Riom - Caete Photos on Instagram