Bug 21349 - hostname should be required during installation
Summary: hostname should be required during installation
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: Mageia 10
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-25 17:08 CEST by magnux77
Modified: 2023-10-20 13:45 CEST (History)
7 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description magnux77 2017-07-25 17:08:45 CEST
After installation, a Mageia machine is always named 'localhost.localdomain'

It is possible to edit /etc/hostname and /etc/hosts, but it will be better if installer requires the hostname from the user during installation (as Debian does)

Kernel updates should not clear anymore this hostname value as it is now.

Ant these names should be recognize by the local router. I do not know why but my router knows my RasPi's, the CPL plugin, but not the Mageia machines...

I have no opinion about localdomain. 
Advices during installation could be very simple : the name you want give to your machine, the name you want to give to your local network.

Thanks
Comment 1 Rémi Verschelde 2017-07-25 17:11:28 CEST
I agree, that would be a nice feature to have. So far the workflow I've used to set my hostname is when (re)configuring the Internet connection after install in the MCC; it would be much better to be able to set it up during install independently of the network.

Target Milestone: --- => Mageia 7
Assignee: bugsquad => mageiatools

Comment 2 Frank Griffin 2017-07-25 17:15:02 CEST
This should be optional, since advanced setups use DHCP to supply the hostname based on MAC address.

CC: (none) => ftg

Comment 3 Charles Edwards 2017-07-25 19:01:45 CEST
This can easily be set at the Configuration stage of the installation by manually
configuring the Network.

It can also be set when you add online media during the Mga X installation.
(I do it on my installs)

[charles@SuperSize ~]$ hostname
SuperSize.eslrahc.com

CC: (none) => cae

Comment 4 Bit Twister 2017-07-26 05:06:29 CEST
(In reply to magnux77 from comment #0)
> After installation, a Mageia machine is always named 'localhost.localdomain'

Hmm, I always set it during install of classic DVD via the network setup screen.

> It is possible to edit /etc/hostname and /etc/hosts,

Or better yet, use the "hostname new_FQDN_here" command to set /etc/hostname

I assume you also change other files like
/etc/sysconfig/network and DOMAIN= in any network configuration files.

> but it will be better
> if installer requires the hostname from the user during installation (as
> Debian does)
> 
> Kernel updates should not clear anymore this hostname value as it is now.

I have yet to see that problem. It has never changed on any of my setups,
running 4 nodes and any number of VirtualBox guests.
Then again, I always select Manual ip setup in network setup screen.

> Ant these names should be recognize by the local router.

Nope, we do not need that "requirement". I have no desire to have a FQDN like  cpe-74-085-167-193.tx.res.rr.com

I prefer values I set during install.

$ grep -i host /etc/sysconfig/network
HOSTNAME=wb.home.test
NEEDHOSTNAME=no

$ cat /etc/hostname
wb.home.test

$ grep $(hostname) /etc/hosts
192.168.11.132 wb.home.test wb

$ grep -i domain /etc/sysconfig/network-scripts/ifcfg-en*
/etc/sysconfig/network-scripts/ifcfg-enp3s0:DOMAIN=home.test
/etc/sysconfig/network-scripts/ifcfg-enp4s0:DOMAIN="home.test"

> I do not know why
> but my router knows my RasPi's, the CPL plugin, but not the Mageia
> machines...

During network setup there is a selection which determines if a DHCP user wants name from DHCP server or not. 
 
> I have no opinion about localdomain. 
> Advices during installation could be very simple :

But should suggest not dreaming up just any domain name.

> the name you want give to
> your machine, the name you want to give to your local network.

I suggest default TLD2 name would be .test or .invalid if name not provided by DHCP server.

See http://www.ietf.org/rfc/rfc2606.txt

CC: (none) => bittwister2

Comment 5 magnux77 2019-01-23 15:01:04 CET
I don't know nothing about network admin. I don't even completely understand your solutions. I don't know what should be done. I just say others distros ask for the name of the machine during install and Mageia does not.
magnux77 2019-01-23 15:01:18 CET

CC: (none) => magnux77

Comment 6 Florian Hubold 2019-05-05 23:18:45 CEST
I believe a good idea could be to offer to run manahost from the mageia welcome applet after installation, so that users get a valid hostname. Even when it is possible to set a hostname during installation, most users end up with no hostname and after installation they usually ask how to properly set one.

Also see https://bugs.mageia.org/show_bug.cgi?id=12580

CC: (none) => doktor5000

Comment 7 magnux77 2019-05-25 16:15:07 CEST
I agree with with every king of solution cause i'm unable to find one.
And i consider that a solution of hostname whatevr it is, is bettre than no solution.
Comment 8 Bit Twister 2019-05-25 16:45:35 CEST
(In reply to magnux77 from comment #7)
> I agree with with every king of solution cause i'm unable to find one.
> And i consider that a solution of hostname whatevr it is, is bettre than no
> solution.

Yup, my first linux install was slackware, and I thought darkstar was cute.

It seems easy enough to have a default value like
mageia.distribution.test set in /etc/hostname if /etc/hostname has localhost.
Comment 9 Aurelien Oudelet 2020-12-13 12:18:46 CET
Note that a broken sddm start has been fixed by really setting a FQDN to the machine affected by this bug: https://bugs.mageia.org/show_bug.cgi?id=27601

there was a state when the machine's name was "localhost" and then, when network was available it is renamed to "localhost.localdomain" (due to an obscur script somewhere). MIT-X-COOKIE was set to "localhost" and right after this refuses connections to X server because they are made by a localhost.localdomain host.......

This was fixed by doing as root : "hostnamectl fqdn.name"
Remark that do "hostname fqdn.name" is not persistent across reboot, only "hostnamectl fqdn.name" one.

We really need a way to have a mandatory dialog in Installer (DrakX) to have a machine name. There also must be an example in the dialog.

CC: (none) => ouaurelien

Morgan Leijström 2020-12-13 20:37:47 CET

CC: (none) => fri

Morgan Leijström 2023-10-20 13:45:20 CEST

Target Milestone: Mageia 7 => Mageia 10
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=10077


Note You need to log in before you can comment on or make changes to this bug.